lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211105075756.GI174703@worktop.programming.kicks-ass.net>
Date:   Fri, 5 Nov 2021 08:57:56 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org, mark.rutland@....com,
        dvyukov@...gle.com, seanjc@...gle.com, pbonzini@...hat.com,
        mbenes@...e.cz
Subject: Re: [RFC][PATCH 14/22] x86,ftrace: Remove .fixup usage

On Thu, Nov 04, 2021 at 03:35:50PM -0700, Josh Poimboeuf wrote:
> On Thu, Nov 04, 2021 at 05:47:43PM +0100, Peter Zijlstra wrote:
> > Create and use EX_TYPE_ONE_REG to load 1 into the %[faulted] register
> > on exception.
> > 
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
> >  arch/x86/include/asm/extable_fixup_types.h |    1 +
> >  arch/x86/kernel/ftrace.c                   |    9 ++-------
> >  2 files changed, 3 insertions(+), 7 deletions(-)
> > 
> > --- a/arch/x86/include/asm/extable_fixup_types.h
> > +++ b/arch/x86/include/asm/extable_fixup_types.h
> > @@ -37,5 +37,6 @@
> >  #define	EX_TYPE_EFAULT_REG		(EX_TYPE_IMM_REG | EX_TYPE_IMM(-EFAULT))
> >  #define	EX_TYPE_NEG_REG			(EX_TYPE_IMM_REG | EX_TYPE_IMM(-1))
> >  #define	EX_TYPE_ZERO_REG		(EX_TYPE_IMM_REG | EX_TYPE_IMM(0))
> > +#define	EX_TYPE_ONE_REG			(EX_TYPE_IMM_REG | EX_TYPE_IMM(1))
> >  
> >  #endif
> > --- a/arch/x86/kernel/ftrace.c
> > +++ b/arch/x86/kernel/ftrace.c
> > @@ -661,13 +661,8 @@ void prepare_ftrace_return(unsigned long
> >  		"   movl $0, %[faulted]\n"
> >  		"3:\n"
> >  
> > -		".section .fixup, \"ax\"\n"
> > -		"4: movl $1, %[faulted]\n"
> > -		"   jmp 3b\n"
> > -		".previous\n"
> > -
> > -		_ASM_EXTABLE(1b, 4b)
> > -		_ASM_EXTABLE(2b, 4b)
> > +		_ASM_EXTABLE_TYPE_REG(1b, 3b, EX_TYPE_ONE_REG, %[faulted])
> > +		_ASM_EXTABLE_TYPE_REG(2b, 3b, EX_TYPE_ONE_REG, %[faulted])
> >  
> >  		: [old] "=&r" (old), [faulted] "=r" (faulted)
> >  		: [parent] "r" (parent), [return_hooker] "r" (return_hooker)
> 
> This fixup code seems to no longer exist in the latest.

\o/, less patches. That's the risk of doing this stuff during the merge
window I suppose :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ