Re: [GIT PULL] objtool fixes

From: Linus Torvalds
Date: Thu Apr 03 2025 - 16:10:02 EST


On Thu, 3 Apr 2025 at 11:24, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> There's also smap_save() / smap_restore(). For the latter we'd need to
> look for alternatives with "push reg; popf", which is definitely not
> SMAP-specific. So we'd need to start reading feature bits again, which
> ends up even worse than what we had before.

Now, I agree that smap_save / smap_restore might be worthy of an
annotation, to show that "this is just a push/pop, but the intent is
to save AC".

Would that be ok?

Because I want to have *less* noise for clac/stac, not more.

The reason I noticed this immediately is that clac/stac are literally
one of my "top 10" things I ever look at.

The optimized user copies (so the masked_user_access_begin() ->
unsafe_get_user() -> user_read_access_end() path) and the dcache are
the two places I look at almost constantly, because it turns out that
those two things are the ones that show up the most on my machines.

The dcache doesn't do the clac/stac part (well, 'strncpy_from_user()'
does, but while that's related to, it precedes the actual pathname
lookup), so it's not like clac/stac is *all* I look at, but it really
is important to me.

Linus