[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250627105125.GX1613200@noisy.programming.kicks-ass.net>
Date: Fri, 27 Jun 2025 12:51:25 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Petr Mladek <pmladek@...e.com>, Miroslav Benes <mbenes@...e.cz>,
Joe Lawrence <joe.lawrence@...hat.com>,
live-patching@...r.kernel.org, Song Liu <song@...nel.org>,
laokz <laokz@...mail.com>, Jiri Kosina <jikos@...nel.org>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Weinan Liu <wnliu@...gle.com>,
Fazla Mehrab <a.mehrab@...edance.com>,
Chen Zhongjin <chenzhongjin@...wei.com>,
Puranjay Mohan <puranjay@...nel.org>,
Dylan Hatch <dylanbhatch@...gle.com>
Subject: Re: [PATCH v3 45/64] x86/static_call: Define ELF section entry size
of static calls
On Thu, Jun 26, 2025 at 04:55:32PM -0700, Josh Poimboeuf wrote:
> In preparation for the objtool klp diff subcommand, define the entry
> size for the .static_call_sites section in its ELF header. This will
> allow tooling to extract individual entries.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> ---
> arch/x86/include/asm/static_call.h | 3 ++-
> include/linux/static_call.h | 6 ------
> include/linux/static_call_types.h | 6 ++++++
> kernel/bounds.c | 4 ++++
> tools/include/linux/static_call_types.h | 6 ++++++
> tools/objtool/check.c | 11 +++++++++--
> 6 files changed, 27 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/static_call.h b/arch/x86/include/asm/static_call.h
> index 41502bd2afd6..e03ad9bbbf59 100644
> --- a/arch/x86/include/asm/static_call.h
> +++ b/arch/x86/include/asm/static_call.h
> @@ -58,7 +58,8 @@
> ARCH_DEFINE_STATIC_CALL_TRAMP(name, __static_call_return0)
>
> #define ARCH_ADD_TRAMP_KEY(name) \
> - asm(".pushsection .static_call_tramp_key, \"a\" \n" \
> + asm(".pushsection .static_call_tramp_key, \"aM\", @progbits, " \
> + __stringify(STATIC_CALL_TRAMP_KEY_SIZE) "\n" \
More horrifically confusing indenting.
> ".long " STATIC_CALL_TRAMP_STR(name) " - . \n" \
> ".long " STATIC_CALL_KEY_STR(name) " - . \n" \
> ".popsection \n")
Powered by blists - more mailing lists