]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
csky, hexagon: fix broken sys_sync_file_range
authorArnd Bergmann <arnd@arndb.de>
Fri, 14 Jun 2024 07:54:20 +0000 (09:54 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 25 Jun 2024 13:57:37 +0000 (15:57 +0200)
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@vger.kernel.org
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/csky/include/uapi/asm/unistd.h
arch/hexagon/include/uapi/asm/unistd.h

index 7ff6a2466af10d9655433503376aa90de0a3911d..e0594b6370a658382478782501c338614e2bb76e 100644 (file)
@@ -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)
index 432c4db1b623927c876faac226bbce79579a26bd..21ae22306b5dce7f63f67aedbe48078a15eb757b 100644 (file)
@@ -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
 
 #include <asm-generic/unistd.h>