From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14753 invoked from network); 21 Feb 2023 21:28:58 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 21 Feb 2023 21:28:58 -0000 Received: (qmail 19589 invoked by uid 550); 21 Feb 2023 21:28:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 19557 invoked from network); 21 Feb 2023 21:28:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1677014923; i=nullplan@gmx.net; bh=JbY182Fjpi6ht7oaAHwg3o2GgEgSM3MdVIKr5KO+Q1g=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=GM0y0SP7WbSzmtfTRwOwmfxD80+1Y3sOOfF+m2VC4ZPuXenlpGoAqRLshU1pDhB+V DUq1uroPvuHY2KX6Qy/3Ih8yL6Z0JIEpcWtFU+Qie7su8ZKWOz+6uzxQSpMUy0ZvXv 4nimankhtjLMFM/88yb5YYNfnidTiqQjCeFOktbm3gHajRDPwnOvqSurOMzfJLHJb4 4fqme2JmtAlFPpZOmuPU7/WIZDPP8nP+X+I8eAcunkAaO56/LUazHDI8oF9GWSKE1W jrUTzD+PJhWBr5mp6ZMxZRszRgf3EuCcxFffi+UBIy1SDkiROVAhirDXwp8IRChxc2 cArJQ3TloB/aA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Tue, 21 Feb 2023 22:28:42 +0100 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: <20230221212842.GG1903@voyager> References: <99826a90-6658-099e-9df8-d0bba78b8f0f@gmail.com> <20230221160455.GF1903@voyager> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:y/eFCVMSK/KsEABSjhpiFADdbltAr12MDVchDXeMKz/nGWVog8P j1CL6Cb8+dh/dcj9ep3HGHI+iVpZiMjiHpanEWkYKE6yI5pnKb75AfMxv/r7XDX3zfM0qNB M9HZl2yeWmQizpkp7Noyl6FicUaZl8MEPiE4MhTd1Fi7RaLlHPlZLwNPAgXgxi/M/GMR8yn pzALWKLfPxwdXEvAgKCBQ== UI-OutboundReport: notjunk:1;M01:P0:/3IanJKn104=;ZGGGVNaKULqtOAMBEW4DvdVGIfq N7Y3sXeBRQRduVfgxMviWvd+xu5cdtk3liVUPCZyWO+IfVPIkFul4x9fspPfbNam/ZdqWhpNc bJoLrh3tp/BUu7lGR/41zBilBGcBqp1+HTFzFh2r8M1xUpJL7nDsVTnohDuOoIiK6OYdKS2mQ ngc5STxP4JzmM2m+Y8N38lWCrghVCDR5WMa+PSxnb8bZsatQA0r+RtWcVt50G84RVVDdD3Wgg yatCGmbFlvVxRpIgpRvQ5C5G5v68AbrBriXPRXwJOagpi3fNlr09y1dsk/E4qflMoHC0gnasL gwMAaffp/MMNUfjZ6AkhudG7h61drawK5FPUk/kE8NUw6gcDjy3JMKSYmCfreh8kUwdmWait7 3PiPiA+toqLlxCxXeaSb3i9G0kJvfhpnksu03yCNEilc22q6QaxvPfdZfTolJmwVjl3G2APms UbyO1lpl+4UkOeJmS1lT6Kym7JKE7/OwSpkLMo4VFK3hpenOb8PSu50IxqW3G5pqhc1N5brbL mD2AAddHCq7V4YCmmjUBDD1mEo7LGxyZRqXPUh2JxsZAZAlZ/UZgXGEmCzZ8mUQ7O/RcPf7cr 7kUc5MkDi1AW+RlHGH1Sx+ob92xSLrl4uN2GRe+qUOE+GaiE2duKcrIaf/XWk088xvidu+LRk A93pqLYNPT9NWV5ZWj24OVgVAEO56Y5LIynfleaGz8/JeZKC2b20U6TnQ7hhaFe3QIw27fFho 7fffuf74shmFZ4GvMSgKxFO+Qb3KCtJV5Q2gbhjIcPJfaruPCiHuGMVro/j4Olgm2VzKpN+J7 tDXiyvdQPJ8ywCcv99SK6Vo6nKIAQ2EBrujC5IDyz4ltJu0N4JewmwhOQnhQohlqLpb/J1+6Z YMdKGCzIfexX4Qvwc6n66G2Rq1AsGjk5B44FIybZk2m9EylfBzATdU7zlobj12XiYPBfT6s1j pNCIvw== Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Re: [BUG] ioctl: overflow in implicit constant conversion On Tue, Feb 21, 2023 at 11:57:50AM -0500, Jeffrey Walton wrote: > In this case, I think the best course of action is to cast a,b,c to > unsigned, then perform the shifts, and finally cast back to int. That > is what the C standard requires. And it should not mess with the ABI. > Actually I messed up. That mostly happens already. The directions are defined as unsigned, and the conversion to int happens implicitly. So there is no undefined behavior. The compiler is merely warning about nothing. That also means the only thing missing to silence the warning would be a cast back to int. However, we have in the past never added code just to shut up overeager warnings. Should the compiler not suppress warnings that come from system headers? Ciao, Markus