Re: [patch 00/38] x86/retbleed: Call depth tracking mitigation

From: Linus Torvalds
Date: Thu Jul 21 2022 - 14:32:56 EST


On Thu, Jul 21, 2022 at 11:27 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> R11,R11 are caller-saved, and since this is the actual call site, the
> caller must already have saved them or marked them clobbered.

Ok. I don't know the context, but I was thinking along the lines of
the same hash value perhaps being used multiple times because it has
the same function type. Then using the "addl" trick means that the
hash value in %r10 will be changing and cannot be re-used.

But I guess this is *much* too late for those kinds of optimizations,
as it literally just outputs the raw instruction sequence, and so the
(negated) hash value will always be re-generated anyway, no re-use
possible.

Linus