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

From: Joao Moreira
Date: Thu Jul 21 2022 - 16:22:26 EST


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.

Fwiiw, even if %r10 value was not being destroyed by the "addl", the call right after the check implies that you cannot trust the contents of %r10 anymore (it may have been messed up within the called function).