linux/arch/sh
Arnd Bergmann 30766f1105 sh: rework sync_file_range ABI
The unusual function calling conventions on SuperH ended up causing
sync_file_range to have the wrong argument order, with the 'flags'
argument getting sorted before 'nbytes' by the compiler.

In userspace, I found that musl, glibc, uclibc and strace all expect the
normal calling conventions with 'nbytes' last, so changing the kernel
to match them should make all of those work.

In order to be able to also fix libc implementations to work with existing
kernels, they need to be able to tell which ABI is used. An easy way
to do this is to add yet another system call using the sync_file_range2
ABI that works the same on all architectures.

Old user binaries can now work on new kernels, and new binaries can
try the new sync_file_range2() to work with new kernels or fall back
to the old sync_file_range() version if that doesn't exist.

Cc: stable@vger.kernel.org
Fixes: 75c92acdd5 ("sh: Wire up new syscalls.")
Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-06-25 15:57:26 +02:00
..
boards sh: of-generic: Add missing #include <asm/clock.h> 2024-05-13 15:37:11 +02:00
boot Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
drivers sh: push-switch: Convert to platform remove callback returning void 2024-05-02 12:02:22 +02:00
include asm-generic cleanups for 6.10 2024-05-20 15:18:34 -07:00
kernel sh: rework sync_file_range ABI 2024-06-25 15:57:26 +02:00
lib Revert "sh: Handle calling csum_partial with misaligned data" 2024-05-02 12:02:38 +02:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
tools
Kbuild sh: Move build rule for cchips/hd6446x/ to arch/sh/Kbuild 2023-07-05 18:55:18 +02:00
Kconfig The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Remove compiler flag duplication 2023-07-05 18:55:25 +02:00