arm64: zero GPRs upon entry from EL0
authorMark Rutland <mark.rutland@arm.com>
Wed, 11 Jul 2018 13:56:48 +0000 (14:56 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 12 Jul 2018 13:49:47 +0000 (14:49 +0100)
commitbaaa7237fecc5ada99e518f38541126977ca7ff4
tree3816c163ef9d02a4bd72a1ed83bb38932a7c36b1
parent99ed3ed08d629eb0db6866d266e2bbe35efa5f9d
arm64: zero GPRs upon entry from EL0

We can zero GPRs x0 - x29 upon entry from EL0 to make it harder for
userspace to control values consumed by speculative gadgets.

We don't blat x30, since this is stashed much later, and we'll blat it
before invoking C code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/entry.S