Re: Stackleak vs noinstr (Was: [GIT pull] objtool/core for v5.16-rc1)

From: Linus Torvalds
Date: Tue Nov 02 2021 - 13:50:45 EST


On Tue, Nov 2, 2021 at 3:05 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Having the plugin gate on section name seems a lot hacky, but given it's
> already doing that, one more doesn't hurt.

Looks sane to me.

Some of the other warnings are just odd.

Why is mce_setup() 'noinst'? I'm not seeing any reason for it, but
maybe I'm just blind. That one complains about the memcpy() call.

Of course, I suspect memcpy/memset might be better off noinstr anyway,
exactly because they can happen for very regular C code (struct
assignments etc). But mce_setup() doesn't really seem to have much
reason to not be instrumented.

Linus