linux/arch/x86/entry
Xin Li 498bdedca5 x86/ptrace: Cleanup the definition of the pt_regs structure
[ Upstream commit ee63291aa8 ]

struct pt_regs is hard to read because the member or section related
comments are not aligned with the members.

The 'cs' and 'ss' members of pt_regs are type of 'unsigned long' while
in reality they are only 16-bit wide. This works so far as the
remaining space is unused, but FRED will use the remaining bits for
other purposes.

To prepare for FRED:

  - Cleanup the formatting
  - Convert 'cs' and 'ss' to u16 and embed them into an union
    with a u64
  - Fixup the related printk() format strings

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Originally-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Xin Li <xin3.li@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Shan Kang <shan.kang@intel.com>
Link: https://lore.kernel.org/r/20231205105030.8698-14-xin3.li@intel.com
Stable-dep-of: dc81e556f2 ("x86/fred: Clear WFE in missing-ENDBRANCH #CPs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-01-09 13:31:51 +01:00
..
syscalls syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:34:04 +02:00
vdso kbuild: unify vdso_install rules 2024-06-12 11:12:32 +02:00
vsyscall x86/ptrace: Cleanup the definition of the pt_regs structure 2025-01-09 13:31:51 +01:00
calling.h x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
common.c x86/bhi: Add support for clearing branch history at syscall entry 2024-04-10 16:36:07 +02:00
entry.S x86/stackprotector: Work around strict Clang TLS symbol requirements 2024-12-09 10:31:41 +01:00
entry_32.S x86/entry_32: Clear CPU buffers after register restore in NMI return 2024-10-22 15:46:34 +02:00
entry_64.S x86/entry/64: Remove obsolete comment on tracing vs. SYSRET 2024-07-18 13:21:26 +02:00
entry_64_compat.S x86/bhi: Avoid warning in #DB handler due to BHI mitigation 2024-07-18 13:21:27 +02:00
Makefile x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y 2022-08-04 12:23:50 +02:00
syscall_32.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:36:07 +02:00
syscall_64.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:36:07 +02:00
syscall_x32.c x86/syscall: Don't force use of indirect calls for system calls 2024-04-10 16:36:07 +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