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: <20200123144044.GB19649@willie-the-truck>
Date:   Thu, 23 Jan 2020 14:40:44 +0000
From:   Will Deacon <will@...nel.org>
To:     Julien Thierry <jthierry@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        jpoimboe@...hat.com, peterz@...radead.org, raphael.gault@....com,
        catalin.marinas@....com
Subject: Re: [RFC v5 47/57] arm64: assembler: Add macro to annotate asm
 function having non standard stack-frame.

On Thu, Jan 23, 2020 at 01:45:58PM +0000, Julien Thierry wrote:
> On 1/21/20 10:30 AM, Will Deacon wrote:
> > On Thu, Jan 09, 2020 at 04:02:50PM +0000, Julien Thierry wrote:
> > > From: Raphael Gault <raphael.gault@....com>
> > > diff --git a/include/linux/frame.h b/include/linux/frame.h
> > > index 02d3ca2d9598..1e35e58ab259 100644
> > > --- a/include/linux/frame.h
> > > +++ b/include/linux/frame.h
> > > @@ -11,14 +11,31 @@
> > >    *
> > >    * For more information, see tools/objtool/Documentation/stack-validation.txt.
> > >    */
> > > +#ifndef __ASSEMBLY__
> > >   #define STACK_FRAME_NON_STANDARD(func) \
> > >   	static void __used __section(.discard.func_stack_frame_non_standard) \
> > >   		*__func_stack_frame_non_standard_##func = func
> > > +#else
> > > +	/*
> > > +	 * This macro is the arm64 assembler equivalent of the
> > > +	 * macro STACK_FRAME_NON_STANDARD define at
> > > +	 * ~/include/linux/frame.h
> > > +	 */
> > > +	.macro	asm_stack_frame_non_standard	func
> > > +	.pushsection ".discard.func_stack_frame_non_standard"
> > > +	.quad	\func
> > > +	.popsection
> > > +	.endm
> > > 
> > > +#endif /* __ASSEMBLY__ */
> > >   #else /* !CONFIG_STACK_VALIDATION */
> > > 
> > > +#ifndef __ASSEMBLY__
> > >   #define STACK_FRAME_NON_STANDARD(func)
> > > -
> > > +#else
> > > +	.macro	asm_stack_frame_non_standard	func
> > > +	.endm
> > > +#endif /* __ASSEMBLY__ */
> > 
> > Hmm. Given that we're currently going through the exercise of converting
> > a bunch of ENTRY/ENDPROC macros to use the new SYM_{CODE,FUNC}_{START,END}
> > macros, I would much prefer for this to be a new flavour of those.
> > 
> > In fact, can you just use SYM_CODE_* for this?
> > 
> 
> You mean to not introduce the STACK_FRAME_NON_STANDARD() macro and just mark
> the asm callable symbols that don't set up a stackframe as SYM_CODE_* ?

Yes, unless I'm mistaken, SYM_CODE_* is intended for that sort of thing
anyway.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ