From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 6AE82253B6 for ; Sat, 29 Jun 2024 20:00:23 +0200 (CEST) Received: (qmail 24502 invoked by uid 550); 29 Jun 2024 18:00:16 -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 13689 invoked from network); 29 Jun 2024 17:46:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719683195; x=1720287995; darn=lists.openwall.com; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=xJTuEAT8kFn/N38NgReiBC7u1W13u19d45QTb6wSxDI=; b=SYzqHpFi4dCmRQVM4BknEphWEWc2a9TNDAx/RuM02+1x2bHu886zXqCkcG6gnlcb7h Aiv/w1jGd4ITPwEBKPV4ofP6S2YxjZcZBlI6FwuVSM9xZPG6HEj9E4iDKZK2tSNcETOP 1Yd0YNVR5602TiAy42Miv44b7qINHaaSmyTK8EvJWnACzOrvcJN3zSLZBPXvHoD1OWNy IJ6om6NFtG6JpDHyvwkGVb+5ar6r566t9phJupsCoiCpI+hwhJeeH/5MORWObNh7e/9t VFb2OWEGlWYXRtw3cd6oebVkPNfcbgpCq1DD8AbAIJH0DLZntxFxUei/yAbagLgWD4Fo Gzkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719683195; x=1720287995; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xJTuEAT8kFn/N38NgReiBC7u1W13u19d45QTb6wSxDI=; b=OZwvMY9mXjVlHneDaDuzhPzgGLVGFWXfINiEEuEW1R8BIAlywq3icYiNasWnX1TCwL 12BHMrXuQG9G+B2LiypP8KAj4dCqDikJrF8f74AY5c6qSWbajcIhUneTEabdqOzPDEmd KPdYvm6kVeh4M8QLY4yNS972PWatcMR2derVcIO7LA8z1y6MwVOEKW+4v4IXE2IE6b6A AJERv73cW8FtnadXJNGTF4sI3Y4SHM83Zp5y4kR8KpqqhTCVlZL7EPfkItLYuylqVsL7 OldHWwobjQvcckbDq2SYVeeugt16jqXFZjhzXsewxmcTWs452bgXkcdIUAONtc+N6A47 6qaw== X-Forwarded-Encrypted: i=1; AJvYcCXQ85xoFgoiN9MDaP5c8iGfMa0GejgoCGRSuxjOrOxmkl4uZ1/dNsHKCzG9LXSMx+I2W4EONKV5nE9qxw7LsEyiHaZLgJoFZg== X-Gm-Message-State: AOJu0YyshHYRtO/M6ADdjKnRwf8a71+QcQfxyAhToYx3UsZzC8H/8AxO 9sz4RtaPE5pIbQrUgcB9+KOcQ7C/+DytSLUOf3pFa6CxP+F5Wsb+ X-Google-Smtp-Source: AGHT+IGXRwOTNfWOpdGXl+28hO8NMkh0znjd2CrkAf/HqJ5kuBn+8boNjwtHpyuWIrNeZ3XB7V/gSQ== X-Received: by 2002:a17:902:ea0b:b0:1f6:3580:65c9 with SMTP id d9443c01a7336-1fadb4afc15mr29069525ad.26.1719683195282; Sat, 29 Jun 2024 10:46:35 -0700 (PDT) Sender: Guenter Roeck Date: Sat, 29 Jun 2024 10:46:33 -0700 From: Guenter Roeck To: Arnd Bergmann Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Helge Deller , linux-parisc@vger.kernel.org, "David S. Miller" , Andreas Larsson , sparclinux@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N . Rao" , linuxppc-dev@lists.ozlabs.org, Brian Cain , linux-hexagon@vger.kernel.org, Guo Ren , linux-csky@vger.kernel.org, Heiko Carstens , linux-s390@vger.kernel.org, Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, "H. Peter Anvin" , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, libc-alpha@sourceware.org, musl@lists.openwall.com, Adhemerval Zanella Message-ID: References: <20240624163707.299494-1-arnd@kernel.org> <20240624163707.299494-7-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240624163707.299494-7-arnd@kernel.org> Subject: [musl] Re: [PATCH v2 06/13] parisc: use generic sys_fanotify_mark implementation On Mon, Jun 24, 2024 at 06:37:04PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The sys_fanotify_mark() syscall on parisc uses the reverse word order > for the two halves of the 64-bit argument compared to all syscalls on > all 32-bit architectures. As far as I can tell, the problem is that > the function arguments on parisc are sorted backwards (26, 25, 24, 23, > ...) compared to everyone else, so the calling conventions of using an > even/odd register pair in native word order result in the lower word > coming first in function arguments, matching the expected behavior > on little-endian architectures. The system call conventions however > ended up matching what the other 32-bit architectures do. > > A glibc cleanup in 2020 changed the userspace behavior in a way that > handles all architectures consistently, but this inadvertently broke > parisc32 by changing to the same method as everyone else. > > The change made it into glibc-2.35 and subsequently into debian 12 > (bookworm), which is the latest stable release. This means we > need to choose between reverting the glibc change or changing the > kernel to match it again, but either hange will leave some systems > broken. > > Pick the option that is more likely to help current and future > users and change the kernel to match current glibc. This also > means the behavior is now consistent across architectures, but > it breaks running new kernels with old glibc builds before 2.35. > > Link: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d150181d73d9 > Link: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/arch/parisc/kernel/sys_parisc.c?h=57b1dfbd5b4a39d > Cc: Adhemerval Zanella > Tested-by: Helge Deller > Acked-by: Helge Deller > Signed-off-by: Arnd Bergmann > --- > I found this through code inspection, please double-check to make > sure I got the bug and the fix right. > Building parisc:allmodconfig ... failed -------------- Error log: In file included from fs/notify/fanotify/fanotify_user.c:14: include/linux/syscalls.h:248:25: error: conflicting types for 'sys_fanotify_mark'; have 'long int(int, unsigned int, u32, u32, int, const char *)' {aka 'long int(int, unsigned int, unsigned int, unsigned int, int, const char *)'} 248 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | ^~~ include/linux/syscalls.h:234:9: note: in expansion of macro '__SYSCALL_DEFINEx' 234 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~ include/linux/syscalls.h:228:36: note: in expansion of macro 'SYSCALL_DEFINEx' 228 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) | ^~~~~~~~~~~~~~~ include/linux/syscalls.h:287:27: note: in expansion of macro 'SYSCALL_DEFINE6' 287 | #define SYSCALL32_DEFINE6 SYSCALL_DEFINE6 | ^~~~~~~~~~~~~~~ fs/notify/fanotify/fanotify_user.c:1924:1: note: in expansion of macro 'SYSCALL32_DEFINE6' 1924 | SYSCALL32_DEFINE6(fanotify_mark, | ^~~~~~~~~~~~~~~~~ include/linux/syscalls.h:862:17: note: previous declaration of 'sys_fanotify_mark' with type 'long int(int, unsigned int, u64, int, const char *)' {aka 'long int(int, unsigned int, long long unsigned int, int, const char *)'} 862 | asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | ^~~~~~~~~~~~~~~~~ make[6]: [scripts/Makefile.build:244: fs/notify/fanotify/fanotify_user.o] Error 1 (ignored) Guenter