From ba6b167af6ee5e63ca79ad22e7719644aed12b2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 20:50:40 +0200 Subject: Merging debian version 6.8.9-1. Signed-off-by: Daniel Baumann --- .../x86-make-x32-syscall-support-conditional.patch | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch') diff --git a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch index c77b75f36d..55f43dcd32 100644 --- a/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch +++ b/debian/patches/features/x86/x86-make-x32-syscall-support-conditional.patch @@ -29,7 +29,7 @@ Signed-off-by: Ben Hutchings --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -6410,6 +6410,10 @@ +@@ -6468,6 +6468,10 @@ later by a loaded module cannot be set this way. Example: sysctl.vm.swappiness=40 @@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings Ignore sysrq setting - this boot parameter will --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -3024,6 +3024,14 @@ config COMPAT_32 +@@ -3052,6 +3052,14 @@ config COMPAT_32 select HAVE_UID16 select OLD_SIGSUSPEND3 @@ -59,14 +59,14 @@ Signed-off-by: Ben Hutchings depends on IA32_EMULATION || X86_X32_ABI --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c -@@ -63,7 +63,7 @@ static __always_inline bool do_syscall_x +@@ -64,7 +64,7 @@ static __always_inline bool do_syscall_x */ unsigned int xnr = nr - __X32_SYSCALL_BIT; - if (IS_ENABLED(CONFIG_X86_X32_ABI) && likely(xnr < X32_NR_syscalls)) { + if (IS_ENABLED(CONFIG_X86_X32_ABI) && unlikely(x32_enabled) && likely(xnr < X32_NR_syscalls)) { xnr = array_index_nospec(xnr, X32_NR_syscalls); - regs->ax = x32_sys_call_table[xnr](regs); + regs->ax = x32_sys_call(regs, xnr); return true; --- a/arch/x86/entry/syscall_x32.c +++ b/arch/x86/entry/syscall_x32.c @@ -80,9 +80,9 @@ Signed-off-by: Ben Hutchings #include #include -@@ -16,3 +19,46 @@ - asmlinkage const sys_call_ptr_t x32_sys_call_table[] = { - #include +@@ -20,3 +23,46 @@ + default: return __x64_sys_ni_syscall(regs); + } }; + +/* Maybe enable x32 syscalls */ @@ -139,10 +139,10 @@ Signed-off-by: Ben Hutchings typedef unsigned long elf_greg_t; -@@ -150,7 +153,8 @@ do { \ +@@ -151,7 +154,8 @@ do { \ #define compat_elf_check_arch(x) \ - ((elf_check_arch_ia32(x) && ia32_enabled()) || \ + ((elf_check_arch_ia32(x) && ia32_enabled_verbose()) || \ - (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64)) + (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \ + (x)->e_machine == EM_X86_64)) @@ -159,9 +159,9 @@ Signed-off-by: Ben Hutchings #include /* for TS_COMPAT */ #include -@@ -30,6 +31,18 @@ extern const sys_call_ptr_t ia32_sys_cal - extern const sys_call_ptr_t x32_sys_call_table[]; - #endif +@@ -28,6 +29,18 @@ extern const sys_call_ptr_t ia32_sys_cal + extern long x32_sys_call(const struct pt_regs *, unsigned int nr); + extern long x64_sys_call(const struct pt_regs *, unsigned int nr); +#if defined(CONFIG_X86_X32_ABI) +#if defined(CONFIG_X86_X32_DISABLED) -- cgit v1.2.3