OpenCloudOS-Kernel/arch/x86/entry
Thomas Gleixner 22ca647c8f x86/entry: Do not allow external 0x80 interrupts
[ upstream commit 55617fb991df535f953589586468612351575704 ]

The INT 0x80 instruction is used for 32-bit x86 Linux syscalls. The
kernel expects to receive a software interrupt as a result of the INT
0x80 instruction. However, an external interrupt on the same vector
also triggers the same codepath.

An external interrupt on vector 0x80 will currently be interpreted as a
32-bit system call, and assuming that it was a user context.

Panic on external interrupts on the vector.

To distinguish software interrupts from external ones, the kernel checks
the APIC ISR bit relevant to the 0x80 vector. For software interrupts,
this bit will be 0.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@vger.kernel.org> # v6.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 18:45:02 +01:00
..
syscalls Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
vdso x86/mm: Fix VDSO and VVAR placement on 5-level paging machines 2023-08-09 13:38:48 -07:00
vsyscall x86: Allow atomic MM_CONTEXT flags setting 2023-03-16 13:08:39 -07:00
Makefile x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00
calling.h x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
common.c x86/entry: Do not allow external 0x80 interrupts 2023-12-13 18:45:02 +01:00
entry.S x86/bugs: Add retbleed=ibpb 2022-06-27 10:34:00 +02:00
entry_32.S x86: Rewrite ret_from_fork() in C 2023-07-10 09:52:25 +02:00
entry_64.S x86: Fix kthread unwind 2023-07-20 23:03:50 +02:00
entry_64_compat.S x86/entry: Convert INT 0x80 emulation to IDTENTRY 2023-12-13 18:45:02 +01:00
syscall_32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_64.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_x32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
thunk_32.S x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00
thunk_64.S x86/entry: Move thunk restore code into thunk functions 2023-06-07 09:54:45 -07:00