[PATCH v2 09/13] csky, hexagon: fix broken sys_sync_file_range
Brian Cain
bcain at quicinc.com
Sat Aug 17 06:27:30 AEST 2024
> -----Original Message-----
> From: Arnd Bergmann <arnd at kernel.org>
> Sent: Monday, June 24, 2024 11:37 AM
> To: linux-arch at vger.kernel.org; linux-kernel at vger.kernel.org
> Cc: Arnd Bergmann <arnd at arndb.de>; Thomas Bogendoerfer
> <tsbogend at alpha.franken.de>; linux-mips at vger.kernel.org; Helge Deller
> <deller at gmx.de>; linux-parisc at vger.kernel.org; David S. Miller
> <davem at davemloft.net>; Andreas Larsson <andreas at gaisler.com>;
> sparclinux at vger.kernel.org; Michael Ellerman <mpe at ellerman.id.au>; Nicholas
> Piggin <npiggin at gmail.com>; Christophe Leroy
> <christophe.leroy at csgroup.eu>; Naveen N . Rao
> <naveen.n.rao at linux.ibm.com>; linuxppc-dev at lists.ozlabs.org; Brian Cain
> <bcain at quicinc.com>; linux-hexagon at vger.kernel.org; Guo Ren
> <guoren at kernel.org>; linux-csky at vger.kernel.org; Heiko Carstens
> <hca at linux.ibm.com>; linux-s390 at vger.kernel.org; Rich Felker
> <dalias at libc.org>; John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>;
> linux-sh at vger.kernel.org; H. Peter Anvin <hpa at zytor.com>; Alexander Viro
> <viro at zeniv.linux.org.uk>; Christian Brauner <brauner at kernel.org>; linux-
> fsdevel at vger.kernel.org; libc-alpha at sourceware.org;
> musl at lists.openwall.com; stable at vger.kernel.org
> Subject: [PATCH v2 09/13] csky, hexagon: fix broken sys_sync_file_range
>
> WARNING: This email originated from outside of Qualcomm. Please be wary of
> any links or attachments, and do not enable macros.
>
> From: Arnd Bergmann <arnd at arndb.de>
>
> Both of these architectures require u64 function arguments to be
> passed in even/odd pairs of registers or stack slots, which in case of
> sync_file_range would result in a seven-argument system call that is
> not currently possible. The system call is therefore incompatible with
> all existing binaries.
>
> While it would be possible to implement support for seven arguments
> like on mips, it seems better to use a six-argument version, either
> with the normal argument order but misaligned as on most architectures
> or with the reordered sync_file_range2() calling conventions as on
> arm and powerpc.
>
> Cc: stable at vger.kernel.org
> Acked-by: Guo Ren <guoren at kernel.org>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> ---
> arch/csky/include/uapi/asm/unistd.h | 1 +
> arch/hexagon/include/uapi/asm/unistd.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/csky/include/uapi/asm/unistd.h
> b/arch/csky/include/uapi/asm/unistd.h
> index 7ff6a2466af1..e0594b6370a6 100644
> --- a/arch/csky/include/uapi/asm/unistd.h
> +++ b/arch/csky/include/uapi/asm/unistd.h
> @@ -6,6 +6,7 @@
> #define __ARCH_WANT_SYS_CLONE3
> #define __ARCH_WANT_SET_GET_RLIMIT
> #define __ARCH_WANT_TIME32_SYSCALLS
> +#define __ARCH_WANT_SYNC_FILE_RANGE2
> #include <asm-generic/unistd.h>
>
> #define __NR_set_thread_area (__NR_arch_specific_syscall + 0)
> diff --git a/arch/hexagon/include/uapi/asm/unistd.h
> b/arch/hexagon/include/uapi/asm/unistd.h
> index 432c4db1b623..21ae22306b5d 100644
> --- a/arch/hexagon/include/uapi/asm/unistd.h
> +++ b/arch/hexagon/include/uapi/asm/unistd.h
> @@ -36,5 +36,6 @@
> #define __ARCH_WANT_SYS_VFORK
> #define __ARCH_WANT_SYS_FORK
> #define __ARCH_WANT_TIME32_SYSCALLS
> +#define __ARCH_WANT_SYNC_FILE_RANGE2
Acked-by: Brian Cain <bcain at quicinc.com>
>
> #include <asm-generic/unistd.h>
> --
> 2.39.2
More information about the Linuxppc-dev
mailing list