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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9474 invoked from network); 26 Mar 2023 21:13:14 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 26 Mar 2023 21:13:14 -0000 Received: (qmail 12210 invoked by uid 550); 26 Mar 2023 21:13:09 -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 12174 invoked from network); 26 Mar 2023 21:13:08 -0000 Date: Sun, 26 Mar 2023 21:12:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=protonmail3; t=1679865176; x=1680124376; bh=wRoyp/BbMMJvB0/gw2hgvOYDWKZ1Y2MAOEcmDejN6rs=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=VZ7qLdx0QAZSDilxTSWPcW1mrmeLZaJyh8WNg1K6X7ki8mD4VlAKy9XK5OOSUTSil MJxcoliaBopsylwv+T9W27nPCsTmhZLJ/QUt4+kNPrfgY5KZydhsi00mqoEuxx3oDO 2dchFqDTVOdUfQM3//XSvuu6IxbC7ZthDDqInMA2Mc9l+qyBS7gcQBwhWhuv8dFXSV dkV0jnnsJ7HnY7nXR703wsX5a2Yu+/67G08IBWPSvdFjp8o6ueC65GDtfBqAiZmxhj 8exuw9sH63CC9dAlbvAUHK1FBfBrpxuWYQVS5ZgossORqtGIAwGaEJJZrKAAozlFrh oG1T72zbHk4/Q== To: "musl@lists.openwall.com" From: ca0 Message-ID: Feedback-ID: 6671822:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [musl] socketcall syscall on x32 ABI producing incorrect results I am running busybox with musl-1.2.3 on x32 linux with gcc-12.2.0. The syscall returns bad address in the case of the bind call. I have traced= this down to the pointer being 0xf...... in 32bits being sign extended to = 32bits in the syscall. Here is the code: 0xf7f687ec=0965=09=09else r =3D __syscall(sys, a, b, c, d, e, f); 0xf7f687e9 <__alt_socketcall+178>:=0948 63 d0 =09movslq %eax,%rdx I can see the address being sign extended as intended by the movslq instruc= tion. If I change the bind implementation to cast this address I do not see this = issue, but other issues arise with the soecket call ie. in bind=20 int bind(int fd, const struct sockaddr *addr, socklen_t len) { long b =3D ((unsigned long)(addr) & 0xffffffff); freturn socketcall(bind, fd, b, len, 0, 0, 0); } Is this a known issue as x32 is marked as experimental. Sent with Proton Mail secure email.