lkml.org 
[lkml]   [2022]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [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

    \
     
     \ /
      Last update: 2022-04-11 11:38    [W:3.062 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site