2021-10-04 19:11:39

by Nick Desaulniers

[permalink] [raw]
Subject: Re: [PATCH v6] kallsyms: strip LTO suffixes from static functions

On Mon, Oct 4, 2021 at 11:05 AM Kees Cook <[email protected]> wrote:
>
> On Mon, 4 Oct 2021 09:29:33 -0700, Nick Desaulniers wrote:
> > Similar to:
> > commit 8b8e6b5d3b01 ("kallsyms: strip ThinLTO hashes from static
> > functions")
> >
> > It's very common for compilers to modify the symbol name for static
> > functions as part of optimizing transformations. That makes hooking
> > static functions (that weren't inlined or DCE'd) with kprobes difficult.
> >
> > [...]
>
> Applied to for-next/hardening, thanks!
>
> [1/1] kallsyms: strip LTO suffixes from static functions
> https://git.kernel.org/kees/c/6eb4bd92c1ce
>
> Also,if you get a moment, can you set up patatt (or b4) to sign your
> outgoing patches? DKIM is nice, but I'd like to see more folks signing
> their emailed patches: https://github.com/mricon/patatt
>
> tl;dr:
>
> add to ~/.gitconfig:
> [patatt]
> signingkey = openpgp:FINGERPRINT-HERE
>
> # install git sendemail hook (assuming you send with git)
> $ patatt install-hook
>
> # or do it manually before sending:
> $ patatt sign $file-with-email
>

Sure thing, trying this out, the commit hook seems broken:
$ git format-patch HEAD~
0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch
$ git send-email --suppress-cc=body --to [email protected]
0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch
patatt: E: -: Not a valid RFC2822 message
fatal: 0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch:
rejected by sendemail-validate hook
fatal: command 'git hook run sendemail-validate -- <patch>' died with
exit code 1
warning: no patches were sent

`patatt sign 0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch`
seems to work.
--
Thanks,
~Nick Desaulniers


2021-10-04 23:30:14

by Konstantin Ryabitsev

[permalink] [raw]
Subject: Re: [PATCH v6] kallsyms: strip LTO suffixes from static functions

On Mon, Oct 04, 2021 at 11:32:43AM -0700, Nick Desaulniers wrote:
> $ git format-patch HEAD~
> 0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch
> $ git send-email --suppress-cc=body --to [email protected]
> 0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch
> patatt: E: -: Not a valid RFC2822 message
> fatal: 0001-ARM-mm-proc-macros-ensure-_tlb_fns-are-4B-aligned.patch:
> rejected by sendemail-validate hook
> fatal: command 'git hook run sendemail-validate -- <patch>' died with
> exit code 1
> warning: no patches were sent

Woah. What git version is this?

-K