x86/traps: Use current_top_of_stack() helper in traps.c
PATCH 1/1 x86/traps: Use current_top_of_stack() helper in traps.c
Use current_top_of_stack() helper in sync_regs() and vc_switch_off_ist() instead of reading top_of_stack percpu variable explicitly.
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Signed-off-by Uros Bizjak <[email protected]>
--- arch/x86/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/traps.c +2 -2
@@ -772,7 +772,7 @@ DEFINE_IDTENTRY_RAW(exc_int3)*/ asmlinkage __visible noinstr struct pt_regs *sync_regs(struct pt_regs *eregs) { -struct pt_regs *regs = (struct pt_regs *)this_cpu_read (pcpu_hot.top_of_stack) -1 ; +struct pt_regs *regs = (struct pt_regs *)current_top_of_stack () -1 ;if (regs != eregs) *regs = *eregs;return regs;
@@ -790,7 +790,7 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r* trust it and switch to the current kernel stack */ if (ip_within_syscall_gap (regs)) { - sp =this_cpu_read (pcpu_hot.top_of_stack); + sp =current_top_of_stack (); goto sync; }
Signature · 1 line
2.41.0