diff options
author | Marc Zyngier <maz@kernel.org> | 2020-07-22 17:22:31 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-07-28 09:03:57 +0100 |
commit | bf4086b1a1efa3d3a2c17582e00bbd2176dfe177 (patch) | |
tree | cf28052876eca7fa9986481ab04692a3ab45dbcc /arch/microblaze | |
parent | b9e10d4a6c9f5cbe6369ce2c17ebc67d2e5a4be5 (diff) | |
download | linux-stable-bf4086b1a1efa3d3a2c17582e00bbd2176dfe177.tar.gz linux-stable-bf4086b1a1efa3d3a2c17582e00bbd2176dfe177.tar.bz2 linux-stable-bf4086b1a1efa3d3a2c17582e00bbd2176dfe177.zip |
KVM: arm64: Prevent vcpu_has_ptrauth from generating OOL functions
So far, vcpu_has_ptrauth() is implemented in terms of system_supports_*_auth()
calls, which are declared "inline". In some specific conditions (clang
and SCS), the "inline" very much turns into an "out of line", which
leads to a fireworks when this predicate is evaluated on a non-VHE
system (right at the beginning of __hyp_handle_ptrauth).
Instead, make sure vcpu_has_ptrauth gets expanded inline by directly
using the cpus_have_final_cap() helpers, which are __always_inline,
generate much better code, and are the only thing that make sense when
running at EL2 on a nVHE system.
Fixes: 29eb5a3c57f7 ("KVM: arm64: Handle PtrAuth traps early")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lore.kernel.org/r/20200722162231.3689767-1-maz@kernel.org
Diffstat (limited to 'arch/microblaze')
0 files changed, 0 insertions, 0 deletions