Pull x86 fixes from Ingo Molnar: - more generic entry code ABI fallout - debug register handling bugfixes - fix vmalloc mappings on 32-bit kernels - kprobes instrumentation output fix on 32-bit kernels - fix over-eager WARN_ON_ONCE() on !SMAP hardware - NUMA debugging fix - fix Clang related crash on !RETPOLINE kernels * tag 'x86-urgent-2020-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Unbreak 32bit fast syscall x86/debug: Allow a single level of #DB recursion x86/entry: Fix AC assertion tracing/kprobes, x86/ptrace: Fix regs argument order for i386 x86, fakenuma: Fix invalid starting node ID x86/mm/32: Bring back vmalloc faulting on x86_32 x86/cmdline: Disable jump tables for cmdline.c
Showing the changes to include/linux (1 of 9 files). Show all
Unified · Split
| @@ -110,15 +110,30 @@ static inline __must_check int arch_syscall_enter_tracehook(struct pt_regs *regs · 109 unmodified lines | |||
| 110 | #endif | 110 | #endif |
| 111 | 111 | ||
| 112 | /** | 112 | /** |
| 113 | * syscall_enter_from_user_mode - Check and handle work before invoking | 113 | * syscall_enter_from_user_mode_prepare - Establish state and enable interrupts |
| 114 | * a syscall | ||
| 115 | * @regs: Pointer to currents pt_regs | 114 | * @regs: Pointer to currents pt_regs |
| 116 | * @syscall: The syscall number | ||
| 117 | * | 115 | * |
| 118 | * Invoked from architecture specific syscall entry code with interrupts | 116 | * Invoked from architecture specific syscall entry code with interrupts |
| 119 | * disabled. The calling code has to be non-instrumentable. When the | 117 | * disabled. The calling code has to be non-instrumentable. When the |
| 120 | * function returns all state is correct and the subsequent functions can be | 118 | * function returns all state is correct, interrupts are enabled and the |
| 121 | * instrumented. | 119 | * subsequent functions can be instrumented. |
| 120 | * | ||
| 121 | * This handles lockdep, RCU (context tracking) and tracing state. | ||
| 122 | * | ||
| 123 | * This is invoked when there is extra architecture specific functionality | ||
| 124 | * to be done between establishing state and handling user mode entry work. | ||
| 125 | */ | ||
| 126 | void syscall_enter_from_user_mode_prepare(struct pt_regs *regs); | ||
| 127 | |||
| 128 | /** | ||
| 129 | * syscall_enter_from_user_mode_work - Check and handle work before invoking | ||
| 130 | * a syscall | ||
| 131 | * @regs: Pointer to currents pt_regs | ||
| 132 | * @syscall: The syscall number | ||
| 133 | * | ||
| 134 | * Invoked from architecture specific syscall entry code with interrupts | ||
| 135 | * enabled after invoking syscall_enter_from_user_mode_prepare() and extra | ||
| 136 | * architecture specific work. | ||
| 122 | * | 137 | * |
| 123 | * Returns: The original or a modified syscall number | 138 | * Returns: The original or a modified syscall number |
| 124 | * | 139 | * |
| @@ -127,12 +142,30 @@ static inline __must_check int arch_syscall_enter_tracehook(struct pt_regs *regs · 2 unmodified lines | |||
| 127 | * syscall_set_return_value() first. If neither of those are called and -1 | 142 | * syscall_set_return_value() first. If neither of those are called and -1 |
| 128 | * is returned, then the syscall will fail with ENOSYS. | 143 | * is returned, then the syscall will fail with ENOSYS. |
| 129 | * | 144 | * |
| 130 | * The following functionality is handled here: | 145 | * It handles the following work items: |
| 131 | * | 146 | * |
| 132 | * 1) Establish state (lockdep, RCU (context tracking), tracing) | 147 | * 1) TIF flag dependent invocations of arch_syscall_enter_tracehook(), |
| 133 | * 2) TIF flag dependent invocations of arch_syscall_enter_tracehook(), | ||
| 134 | * __secure_computing(), trace_sys_enter() | 148 | * __secure_computing(), trace_sys_enter() |
| 135 | * 3) Invocation of audit_syscall_entry() | 149 | * 2) Invocation of audit_syscall_entry() |
| 150 | */ | ||
| 151 | long syscall_enter_from_user_mode_work(struct pt_regs *regs, long syscall); | ||
| 152 | |||
| 153 | /** | ||
| 154 | * syscall_enter_from_user_mode - Establish state and check and handle work | ||
| 155 | * before invoking a syscall | ||
| 156 | * @regs: Pointer to currents pt_regs | ||
| 157 | * @syscall: The syscall number | ||
| 158 | * | ||
| 159 | * Invoked from architecture specific syscall entry code with interrupts | ||
| 160 | * disabled. The calling code has to be non-instrumentable. When the | ||
| 161 | * function returns all state is correct, interrupts are enabled and the | ||
| 162 | * subsequent functions can be instrumented. | ||
| 163 | * | ||
| 164 | * This is combination of syscall_enter_from_user_mode_prepare() and | ||
| 165 | * syscall_enter_from_user_mode_work(). | ||
| 166 | * | ||
| 167 | * Returns: The original or a modified syscall number. See | ||
| 168 | * syscall_enter_from_user_mode_work() for further explanation. | ||
| 136 | */ | 169 | */ |
| 137 | long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall); | 170 | long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall); |
| 138 | 171 | ||