From: Sasha Levin Date: Mon, 1 Jul 2024 17:06:16 +0000 (-0400) Subject: Fixes for 6.6 X-Git-Tag: v4.19.317~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8e4dbc5a9ce5cc0f557aef515a5084273eea8e1;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.6 Signed-off-by: Sasha Levin --- diff --git a/queue-6.6/series b/queue-6.6/series index 258ffec9012..66c5b1067f8 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -147,3 +147,4 @@ ata-ahci-clean-up-sysfs-file-on-error.patch ata-libata-core-fix-double-free-on-error.patch ftruncate-pass-a-signed-offset.patch syscalls-fix-compat_sys_io_pgetevents_time64-usage.patch +syscalls-fix-sys_fanotify_mark-prototype.patch diff --git a/queue-6.6/syscalls-fix-sys_fanotify_mark-prototype.patch b/queue-6.6/syscalls-fix-sys_fanotify_mark-prototype.patch new file mode 100644 index 00000000000..ca2f4c5288a --- /dev/null +++ b/queue-6.6/syscalls-fix-sys_fanotify_mark-prototype.patch @@ -0,0 +1,58 @@ +From 2f71c1b4df2a21263c57f26e8c5f4f739aa8c3e7 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 29 Jun 2024 21:48:41 +0200 +Subject: syscalls: fix sys_fanotify_mark prototype + +From: Arnd Bergmann + +[ Upstream commit 63e2f40c9e3187641afacde4153f54b3ee4dbc8c ] + +My earlier fix missed an incorrect function prototype that shows up on +native 32-bit builds: + +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 *)'} + 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 *)'} + +On x86 and powerpc, the prototype is also wrong but hidden in an #ifdef, +so it never caused problems. + +Add another alternative declaration that matches the conditional function +definition. + +Fixes: 403f17a33073 ("parisc: use generic sys_fanotify_mark implementation") +Cc: stable@vger.kernel.org +Reported-by: Guenter Roeck +Reported-by: Geert Uytterhoeven +Reported-by: kernel test robot +Signed-off-by: Arnd Bergmann +Signed-off-by: Sasha Levin +--- + include/linux/syscalls.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h +index 705977c1b2b2b..36c592e43d652 100644 +--- a/include/linux/syscalls.h ++++ b/include/linux/syscalls.h +@@ -840,9 +840,15 @@ asmlinkage long sys_prlimit64(pid_t pid, unsigned int resource, + const struct rlimit64 __user *new_rlim, + struct rlimit64 __user *old_rlim); + asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags); ++#if defined(CONFIG_ARCH_SPLIT_ARG64) ++asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, ++ unsigned int mask_1, unsigned int mask_2, ++ int dfd, const char __user * pathname); ++#else + asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, + u64 mask, int fd, + const char __user *pathname); ++#endif + asmlinkage long sys_name_to_handle_at(int dfd, const char __user *name, + struct file_handle __user *handle, + int __user *mnt_id, int flag); +-- +2.43.0 +