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 29975 invoked from network); 22 Feb 2023 04:23:31 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 22 Feb 2023 04:23:31 -0000 Received: (qmail 21946 invoked by uid 550); 22 Feb 2023 04:23:26 -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 21908 invoked from network); 22 Feb 2023 04:23:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1677039794; i=nullplan@gmx.net; bh=NfBOgEwL8syEp6PLuw0FwhwZcy8+GoQ5O8bOobEuGEs=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=qh2tZkn6RnaFNH/rntfp2lpTbOnJKa9DAxooqnGuOQ9A0iAN5drKLXNvmLoY7bOoN f9ir0WpcygNy8cP+8/61a6dRc+bdOxdeFzC7kzsjhezb9FNNbW9ppUCM1FU3kfvGst 6gxhPyZA9dspN98mWPR5eJM/2P/DtChu45Ax9oDnOSadFPJU5QeeOcqM7QBy8LRWYw M5sRRl4GDoRp2QuxxiM+8uNwDeX5C0DFq3mJGlqgvbsyR+VIbKKkHd3rBArqGfLPur K1iibBe79bWHoMOQgpJCSWJ+f2v8AVNaigXuXn2qnpiUBXIK0EiMYlYbX+nlejSUgI 31UesqbHfTkpg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Wed, 22 Feb 2023 05:23:12 +0100 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: <20230222042244.GH1903@voyager> References: <99826a90-6658-099e-9df8-d0bba78b8f0f@gmail.com> <20230221160455.GF1903@voyager> <20230222031730.GB4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230222031730.GB4163@brightrain.aerifal.cx> User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:FbAwwZvNDFNQZZHkCVCaQUINNYys3uhkV/50E8LwOqIhdcVpsbt v4/LfRh0mhHTKLshMkcRkR+KpjQaiEw4XIuP0uXIKdnKAfKNSORrm/vgS+oV9F4fxXRvV0e FmmUAFz7KhYWAlOUMHumhtR0SfueWGTtLgOJSY+bOzUVK7EpwFiknHoVnnMLfBdEVbiTaZW W/appdQ8iwf8ZQj/gNr0g== UI-OutboundReport: notjunk:1;M01:P0:bV2a5T/l+DY=;jL0c7iLieqXFSVS9GK2Wq79CnO0 rR/7bmHz2UHSiZRJOjy5S7aslmbzQBaEWLvHF1NWffBnh4ILEXSusWJ0VRk7gGWl++fPpSAKh ch007Fu50Tn2WsOhFnQe/SOUkzLdk0s+QxBd+M6McLfLK3+cHUhipfM4DbKVn9TjKN6V2vCRe lU+8SZngZMBapzgNIrVwH7UlWiwnCIkBiwQlbBCMDrtnHHdxuM8eSD6y7mJdjppeUZNnhwAjU AGkgI0xNDcjMQLzfLwJwkzJvvXb/j3F+P1zmY6h252+53qUF6rYHj8DIp5u373aPxMmrilII3 eisa8sby+trflWkV2iFBi851Z04UBjVYuqySmJtOdRCwg7hOhr3Sxg5krwV85dls2/tCKgjY7 JBURV2JlZlGI1LpOFkJoh4J+kQZEsOE/TYCFlD2EwI0Xr9PkfzAyf67zV9XtqBMWZ7B+59tVQ 6HNuVY8jcwQvYSQbI2FlrRJaeavvagxS6veBCiAENy+YEJwEDQiNfcD9GzIjrcuxbrWXaf7to xy9R14emLyfNYhMQTb0bMMoz8J8tBMBfKbs3wswGpbNLDroHJRjzcGdGpCDrJjvZRmX+TlDLx m1SwR84pz+e4szWldbtVDM5dHtYqDBRI4eUnDwzdsGRGbhjLi7b3Q7dWh0tkYFCj7gngZn8X4 +7BAYVhnH/8sZS/CQ331xrL/fHtKvwYH+yPMbeRYgOAjh2AJDJycFBc1uOiUEssDypi17IL0j 2ofVRMVgP5DNs2e+oYsjf7PKUTcNerkKsh4+xUkJ1Wr9Kap8eSEUJC3Ga4IySiu+YswK8lmiE YU+Rl0UbhkXGLKl/lPBw77dixojm4F+oUj1zXoyPXHICkSAaqo9NON4Br7uJPNucq12DqgYpL sanVhmQ0Vh2fNXPDdAJ1n6N9npUm8BPy7gIsBX8t0JNq6EeVQOJXkz4ks04COokK4VSlzf88z vMMLJOyQWNwpSZSiTXG2sHdZ6Zs= Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Re: [BUG] ioctl: overflow in implicit constant conversion On Tue, Feb 21, 2023 at 10:17:31PM -0500, Rich Felker wrote: > Unless you're seeing something I'm not, there's no UB. The shifts take > place on the unsigned type, and the conversion from unsigned to signed > is implementation-defined, not undefined. The implementation-defined > definition relevant to us is modular reduction. > Yeah, sorry, I had missed that the directions are defined as unsigned constants. That turns any shift that might have been undefined into an unsigned shift, where it is defined. As I said in the other mail, the compiler is just warning about nothing here, and it should probably not warn for system header files, anyway. We may be able to silence the compiler by adding an explicit int conversion to the _IOC macro. But I'm not sure if we want to set a precedent that we will add code just to shut up overeager warnings. Ciao, Markus