[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190822201017.3w77h374qs5uyxso@treble>
Date: Thu, 22 Aug 2019 15:10:17 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Raphael Gault <raphael.gault@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, catalin.marinas@....com, will.deacon@....com,
julien.thierry.kdev@...il.com, raph.gault+kdev@...il.com
Subject: Re: [RFC v4 12/18] arm64: assembler: Add macro to annotate asm
function having non standard stack-frame.
On Fri, Aug 16, 2019 at 01:23:57PM +0100, Raphael Gault wrote:
> Some functions don't have standard stack-frames but are intended
> this way. In order for objtool to ignore those particular cases
> we add a macro that enables us to annotate the cases we chose
> to mark as particular.
>
> Signed-off-by: Raphael Gault <raphael.gault@....com>
> ---
> include/linux/frame.h | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> 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
> + */
This comment is a bit confusing as it's referring to its own header
file. And it's not arm64-specific. I don't think we really need a
comment here anyway.
> + .macro asm_stack_frame_non_standard func
> + .pushsection ".discard.func_stack_frame_non_standard"
> + .quad \func
> + .popsection
> + .endm
Can you call it STACK_FRAME_NON_STANDARD for consistency with the
non-asm version?
--
Josh
Powered by blists - more mailing lists