diff options
author | 2023-12-05 02:50:02 -0800 | |
---|---|---|
committer | 2024-01-31 22:01:13 +0100 | |
commit | ee63291aa8287cb7ded767d340155fe8681fc075 (patch) | |
tree | e6a10d78fcd7754c29ecfc265f6578138b2a7a27 /arch/x86/entry | |
parent | x86/cpu: Add MSR numbers for FRED configuration (diff) | |
download | linux-ee63291aa8287cb7ded767d340155fe8681fc075.tar.gz linux-ee63291aa8287cb7ded767d340155fe8681fc075.tar.bz2 linux-ee63291aa8287cb7ded767d340155fe8681fc075.zip |
x86/ptrace: Cleanup the definition of the pt_regs structure
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
Diffstat (limited to 'arch/x86/entry')
-rw-r--r-- | arch/x86/entry/vsyscall/vsyscall_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index e0ca8120aea8..a3c0df11d0e6 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs, if (!show_unhandled_signals) return; - printk_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n", + printk_ratelimited("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n", level, current->comm, task_pid_nr(current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di); |