Messages in this thread | | | From | Sami Tolvanen <> | Date | Fri, 29 Apr 2022 18:00:03 -0700 | Subject | Re: [RFC PATCH 16/21] objtool: Add support for CONFIG_CFI_CLANG |
| |
On Fri, Apr 29, 2022 at 4:30 PM Peter Zijlstra <peterz@infradead.org> wrote: > Urgh, what does this do for decode speed? This is a hash-lookup for > every single instruction.
Two actually, since .kcfi_traps only contains compiler-emitted locations and we also have to check for manual type annotations. I haven't measured performance yet, but I also didn't notice a significant impact here.
> Is that kcfi location array sorted by the compiler? Because then you can > keep a running iterator and replace the whole lookup with a simple > equality comparison.
The compiler generates a separate .kcfi_types section for each text section and the entries are emitted in order, so this should be doable.
Sami
| |