Re: [PATCH v2 1/3] x86/entry: Clear extra registers beyond syscall arguments for 64bit kernels

From: Andi Kleen
Date: Mon Feb 05 2018 - 10:59:00 EST


> - There's various conditional pieces of entry code that run before any
> RBP-clobbering C function is called. While none of them has an exploitable
> Spectre 'gadget' at the moment, we'd have to consider this for every future
> change.

The Frame Pointer is always set up in assembler too, just in another macro.

There should be only a few pushes between this clear and the set up,
which are not exploitable.

But yes in the end it doesn't matter much either way so the ifdef
could be removed for slightly nicer looking code.

-Andi