Refresh patches
This commit is contained in:
parent
60e35759c4
commit
c8c96bb933
1 changed files with 11 additions and 11 deletions
|
@ -29,7 +29,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
|
||||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
@@ -5768,6 +5768,10 @@
|
@@ -6160,6 +6160,10 @@
|
||||||
later by a loaded module cannot be set this way.
|
later by a loaded module cannot be set this way.
|
||||||
Example: sysctl.vm.swappiness=40
|
Example: sysctl.vm.swappiness=40
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
on older distributions. When this option is enabled
|
on older distributions. When this option is enabled
|
||||||
--- a/arch/x86/Kconfig
|
--- a/arch/x86/Kconfig
|
||||||
+++ b/arch/x86/Kconfig
|
+++ b/arch/x86/Kconfig
|
||||||
@@ -2865,6 +2865,14 @@ config COMPAT_32
|
@@ -2997,6 +2997,14 @@ config COMPAT_32
|
||||||
select HAVE_UID16
|
select HAVE_UID16
|
||||||
select OLD_SIGSUSPEND3
|
select OLD_SIGSUSPEND3
|
||||||
|
|
||||||
|
@ -59,14 +59,14 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
depends on IA32_EMULATION || X86_X32_ABI
|
depends on IA32_EMULATION || X86_X32_ABI
|
||||||
--- a/arch/x86/entry/common.c
|
--- a/arch/x86/entry/common.c
|
||||||
+++ b/arch/x86/entry/common.c
|
+++ b/arch/x86/entry/common.c
|
||||||
@@ -62,7 +62,7 @@ static __always_inline bool do_syscall_x
|
@@ -63,7 +63,7 @@ static __always_inline bool do_syscall_x
|
||||||
*/
|
*/
|
||||||
unsigned int xnr = nr - __X32_SYSCALL_BIT;
|
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) && likely(xnr < X32_NR_syscalls)) {
|
||||||
+ if (IS_ENABLED(CONFIG_X86_X32_ABI) && unlikely(x32_enabled) && 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);
|
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;
|
return true;
|
||||||
--- a/arch/x86/entry/syscall_x32.c
|
--- a/arch/x86/entry/syscall_x32.c
|
||||||
+++ b/arch/x86/entry/syscall_x32.c
|
+++ b/arch/x86/entry/syscall_x32.c
|
||||||
|
@ -80,9 +80,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
#include <linux/syscalls.h>
|
#include <linux/syscalls.h>
|
||||||
#include <asm/syscall.h>
|
#include <asm/syscall.h>
|
||||||
|
|
||||||
@@ -16,3 +19,46 @@
|
@@ -20,3 +23,46 @@ long x32_sys_call(const struct pt_regs *
|
||||||
asmlinkage const sys_call_ptr_t x32_sys_call_table[] = {
|
default: return __x64_sys_ni_syscall(regs);
|
||||||
#include <asm/syscalls_x32.h>
|
}
|
||||||
};
|
};
|
||||||
+
|
+
|
||||||
+/* Maybe enable x32 syscalls */
|
+/* Maybe enable x32 syscalls */
|
||||||
|
@ -139,7 +139,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
|
||||||
typedef unsigned long elf_greg_t;
|
typedef unsigned long elf_greg_t;
|
||||||
|
|
||||||
@@ -161,7 +164,8 @@ do { \
|
@@ -150,7 +153,8 @@ do { \
|
||||||
|
|
||||||
#define compat_elf_check_arch(x) \
|
#define compat_elf_check_arch(x) \
|
||||||
(elf_check_arch_ia32(x) || \
|
(elf_check_arch_ia32(x) || \
|
||||||
|
@ -159,9 +159,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
#include <asm/thread_info.h> /* for TS_COMPAT */
|
#include <asm/thread_info.h> /* for TS_COMPAT */
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
@@ -30,6 +31,18 @@ extern const sys_call_ptr_t ia32_sys_cal
|
@@ -28,6 +29,18 @@ extern long ia32_sys_call(const struct p
|
||||||
extern const sys_call_ptr_t x32_sys_call_table[];
|
extern long x32_sys_call(const struct pt_regs *, unsigned int nr);
|
||||||
#endif
|
extern long x64_sys_call(const struct pt_regs *, unsigned int nr);
|
||||||
|
|
||||||
+#if defined(CONFIG_X86_X32_ABI)
|
+#if defined(CONFIG_X86_X32_ABI)
|
||||||
+#if defined(CONFIG_X86_X32_DISABLED)
|
+#if defined(CONFIG_X86_X32_DISABLED)
|
||||||
|
|
Loading…
Add table
Reference in a new issue