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] [day] [month] [year] [list]
Message-ID: <pkmbl4rn35vugayytvy7hhyfahkyckv6bpsm2tpip24cauhxfs@3skfkcyq2is6>
Date: Fri, 19 Sep 2025 10:47:19 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Dmitry Antipov <dmantipov@...dex.ru>
Cc: Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] objtool: speedup subsequent calls to
 dead_end_function()

On Fri, Sep 19, 2025 at 04:55:57PM +0300, Dmitry Antipov wrote:
> Running over KASAN-enabled vmlinux.o, some functions comes from the
> sanitizer runtime may be processed by 'dead_end_function()' a lot of
> times, so it's reasonable to record the result in 'struct symbol' of
> the relevant function. Briefly testing over huge 'make allyesconfig'
> vmlinux.o, this may speedup objtool by nearly 10%.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@...dex.ru>
> ---
>  tools/objtool/check.c               | 5 ++++-
>  tools/objtool/include/objtool/elf.h | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index d14f20ef1db1..d4c0ef419b95 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -322,7 +322,10 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
>  
>  static bool dead_end_function(struct objtool_file *file, struct symbol *func)
>  {
> -	return __dead_end_function(file, func, 0);
> +	if (func->functype == UNKNOWN)
> +		func->functype = (__dead_end_function(file, func, 0)
> +				  ? NORETURN : REGULAR);
> +	return func->functype == NORETURN;
>  }

Thanks for the patch.

Since this basically gets called at least once for every function
anyway, how about we just identify them during init, all at once, in
decode_sections()?  Then we only need a single "noreturn" bit.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ