Re: [GIT PULL] execve updates for v6.8-rc1

From: Linus Torvalds
Date: Mon Jan 08 2024 - 20:54:21 EST


On Mon, 8 Jan 2024 at 17:48, Kees Cook <kees@xxxxxxxxxx> wrote:
>
> This was exactly the feedback I had originally and wrote almost what you suggest:
>
> https://lore.kernel.org/lkml/202209161637.9EDAF6B18@keescook/
>
> But the perf testing of my proposed "look it up once" patch showed a
> net loss to the successful execs which no one could explain. In the
> end we went with the original proposal.

Basing things one one random benchmark which must clearly have some
very particular cache effects or something is not ok.

End result: I'm not taking a random "look up filename twice because we
can't understand what is going on".

Because I *guarantee* that we can trivially write another benchmark
that shows that looking up the pathname twice is worse.

Linus