[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlP2s5pbY0YcibAC@zn.tnic>
Date: Mon, 11 Apr 2022 11:36:51 +0200
From: Borislav Petkov <bp@...en8.de>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
Lai Jiangshan <jiangshan.ljs@...group.com>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Thomas Tai <thomas.tai@...cle.com>,
"Chang S. Bae" <chang.seok.bae@...el.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH V4 1/7] x86/traps: Move pt_regs only in fixup_bad_iret()
On Fri, Mar 18, 2022 at 10:30:10PM +0800, Lai Jiangshan wrote:
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index 1563fb995005..9fe9cd9d3eeb 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -892,13 +892,8 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r
> }
> #endif
>
> -struct bad_iret_stack {
> - void *error_entry_ret;
> - struct pt_regs regs;
> -};
> -
> asmlinkage __visible noinstr
> -struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
> +struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs)
> {
> /*
> * This is called from entry_64.S early in handling a fault
While at it, unbreak that line:
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 9fe9cd9d3eeb..28591132e885 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -892,8 +892,7 @@ asmlinkage __visible noinstr struct pt_regs *vc_switch_off_ist(struct pt_regs *r
}
#endif
-asmlinkage __visible noinstr
-struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs)
+asmlinkage __visible noinstr struct pt_regs *fixup_bad_iret(struct pt_regs *bad_regs)
{
/*
* This is called from entry_64.S early in handling a fault
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists