Refresh patches
This commit is contained in:
parent
3c4687056e
commit
78c735a869
1 changed files with 13 additions and 16 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
|
||||||
@@ -6410,6 +6410,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
|
||||||
|
|
||||||
|
@ -37,12 +37,9 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
+ an x86_64 kernel where CONFIG_X86_X32 is enabled.
|
+ an x86_64 kernel where CONFIG_X86_X32 is enabled.
|
||||||
+ Default depends on CONFIG_X86_X32_DISABLED.
|
+ Default depends on CONFIG_X86_X32_DISABLED.
|
||||||
+
|
+
|
||||||
sysrq_always_enabled
|
|
||||||
[KNL]
|
|
||||||
Ignore sysrq setting - this boot parameter will
|
|
||||||
--- a/arch/x86/Kconfig
|
--- a/arch/x86/Kconfig
|
||||||
+++ b/arch/x86/Kconfig
|
+++ b/arch/x86/Kconfig
|
||||||
@@ -3024,6 +3024,14 @@ config COMPAT_32
|
@@ -2997,6 +2997,14 @@ config COMPAT_32
|
||||||
select HAVE_UID16
|
select HAVE_UID16
|
||||||
select OLD_SIGSUSPEND3
|
select OLD_SIGSUSPEND3
|
||||||
|
|
||||||
|
@ -66,7 +63,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
- 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 +77,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 */
|
||||||
|
@ -129,7 +126,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
+arch_param_cb(x32, &x32_param_ops, NULL, 0444);
|
+arch_param_cb(x32, &x32_param_ops, NULL, 0444);
|
||||||
--- a/arch/x86/include/asm/elf.h
|
--- a/arch/x86/include/asm/elf.h
|
||||||
+++ b/arch/x86/include/asm/elf.h
|
+++ b/arch/x86/include/asm/elf.h
|
||||||
@@ -12,6 +12,9 @@
|
@@ -11,6 +11,9 @@
|
||||||
#include <asm/user.h>
|
#include <asm/user.h>
|
||||||
#include <asm/auxvec.h>
|
#include <asm/auxvec.h>
|
||||||
#include <asm/fsgsbase.h>
|
#include <asm/fsgsbase.h>
|
||||||
|
@ -142,13 +139,13 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
@@ -150,7 +153,8 @@ do { \
|
@@ -150,7 +153,8 @@ do { \
|
||||||
|
|
||||||
#define compat_elf_check_arch(x) \
|
#define compat_elf_check_arch(x) \
|
||||||
((elf_check_arch_ia32(x) && ia32_enabled()) || \
|
(elf_check_arch_ia32(x) || \
|
||||||
- (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
|
- (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
|
||||||
+ (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \
|
+ (IS_ENABLED(CONFIG_X86_X32_ABI) && x32_enabled && \
|
||||||
+ (x)->e_machine == EM_X86_64))
|
+ (x)->e_machine == EM_X86_64))
|
||||||
|
|
||||||
static inline void elf_common_init(struct thread_struct *t,
|
#if __USER32_DS != __USER_DS
|
||||||
struct pt_regs *regs, const u16 ds)
|
# error "The following code assumes __USER32_DS == __USER_DS"
|
||||||
--- a/arch/x86/include/asm/syscall.h
|
--- a/arch/x86/include/asm/syscall.h
|
||||||
+++ b/arch/x86/include/asm/syscall.h
|
+++ b/arch/x86/include/asm/syscall.h
|
||||||
@@ -13,6 +13,7 @@
|
@@ -13,6 +13,7 @@
|
||||||
|
@ -159,9 +156,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