From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10636 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 1/7] fix preadv2 and pwritev2 syscall numbers on x32 for linux v4.8 Date: Fri, 14 Oct 2016 11:16:05 -0400 Message-ID: <20161014151605.GZ19318@brightrain.aerifal.cx> References: <20161009165810.GC28065@port70.net> <20161014151359.GR28065@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1476458192 800 195.159.176.226 (14 Oct 2016 15:16:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2016 15:16:32 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10649-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 14 17:16:24 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bv4DZ-00073i-H3 for gllmg-musl@m.gmane.org; Fri, 14 Oct 2016 17:16:17 +0200 Original-Received: (qmail 16200 invoked by uid 550); 14 Oct 2016 15:16:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16179 invoked from network); 14 Oct 2016 15:16:17 -0000 Content-Disposition: inline In-Reply-To: <20161014151359.GR28065@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10636 Archived-At: On Fri, Oct 14, 2016 at 05:13:59PM +0200, Szabolcs Nagy wrote: > * Khem Raj [2016-10-14 14:09:10 +0200]: > > > On Sun, Oct 9, 2016 at 6:58 PM, Szabolcs Nagy wrote: > > > the numbers were wrong in musl, but they were also wrong in the kernel > > > and got fixed in v4.8 commit 3ebfd81f7fb3e81a754e37283b7f38c62244641a > > > > what happens if we now build musl trunk with linux kernel 3.7 ? > > > > on v3.7 a raw syscall(__NR_preadv2,..) should return -ENOSYS. > > these syscalls appeared in v4.6 (with wrong numbers: they overlap > with existing x32 numbers), but by accident i added them using > the x86_64 numbers to musl (most x32 syscalls are mapped to > x86_64 numbers), which means there is no overlap in musl. > > with >=v4.6 kernel musl would try to use the x86_64 syscalls from > x32 which is wrong and i don't know how that plays out in practice. > > this affects musl >=v1.1.15 > > linux v4.8 fixed the numbers, so we should fix them too. More accurately, it affects programs making raw syscalls using headers from musl libc >=v1.1.15. musl itself does not use these syscalls at all. Rich