Re: [PATCH 2/3] objtool: optimize insn_hash for split sections
From: Kees Cook
Date: Tue Apr 21 2020 - 16:13:51 EST
On Tue, Apr 21, 2020 at 09:47:49PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 21, 2020 at 11:07:23AM -0700, Sami Tolvanen wrote:
> > When running objtool on vmlinux.o compiled with -ffunction-sections,
> > we end up with a ton of collisions in the insn_hash table as each
> > function is in its own section. This results in a runtime of minutes
> > instead of seconds. Use both section index and offset as the key to
> > avoid this, similarly to rela_hash.
> >
> > Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
>
> I already have this queued:
>
> https://lkml.kernel.org/r/20200416115119.227240432@xxxxxxxxxxxxx
>
> which looks very similar.
Ah! Yeah, just no insn-arg helper to do the hash call; cool.
Please consider both:
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
-Kees
--
Kees Cook