[PATCH 07/17] kallsyms: cfi: strip hashes from static functions

Sami Tolvanen samitolvanen at google.com
Tue Mar 16 20:33:53 GMT 2021


On Thu, Mar 11, 2021 at 6:45 PM Kees Cook <keescook at chromium.org> wrote:
>
> On Thu, Mar 11, 2021 at 04:49:09PM -0800, Sami Tolvanen wrote:
> > With CONFIG_CFI_CLANG and ThinLTO, Clang appends a hash to the names
> > of all static functions not marked __used. This can break userspace
> > tools that don't expect the function name to change, so strip out the
> > hash from the output.
> >
> > Suggested-by: Jack Pham <jackp at codeaurora.org>
> > Signed-off-by: Sami Tolvanen <samitolvanen at google.com>
>
> (Is it possible we could end up with symbol name collisions? ... though
> I guess we would have had collisions before?)

Yes, these are static functions, so name collisions have always been possible.

Sami



More information about the linux-arm-kernel mailing list