* [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2
@ 2022-05-17 14:52 Florian Lugou
2022-05-17 17:44 ` Richard Henderson
2022-05-19 10:23 ` Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Florian Lugou @ 2022-05-17 14:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, qemu-arm, Florian Lugou
As per the description of the HCR_EL2.APK field in the ARMv8 ARM,
Pointer Authentication keys accesses should only be trapped to Secure
EL2 if it is enabled.
Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
---
target/arm/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 432bd81919..29f73c7343 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -6758,7 +6758,7 @@ static CPAccessResult access_pauth(CPUARMState *env, const ARMCPRegInfo *ri,
int el = arm_current_el(env);
if (el < 2 &&
- arm_feature(env, ARM_FEATURE_EL2) &&
+ arm_is_el2_enabled(env) &&
!(arm_hcr_el2_eff(env) & HCR_APK)) {
return CP_ACCESS_TRAP_EL2;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2
2022-05-17 14:52 [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2 Florian Lugou
@ 2022-05-17 17:44 ` Richard Henderson
2022-05-19 10:23 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2022-05-17 17:44 UTC (permalink / raw)
To: Florian Lugou, qemu-devel; +Cc: Peter Maydell, qemu-arm
On 5/17/22 07:52, Florian Lugou wrote:
> As per the description of the HCR_EL2.APK field in the ARMv8 ARM,
> Pointer Authentication keys accesses should only be trapped to Secure
> EL2 if it is enabled.
>
> Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
> ---
> target/arm/helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2
2022-05-17 14:52 [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2 Florian Lugou
2022-05-17 17:44 ` Richard Henderson
@ 2022-05-19 10:23 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2022-05-19 10:23 UTC (permalink / raw)
To: Florian Lugou; +Cc: qemu-devel, qemu-arm
On Tue, 17 May 2022 at 15:53, Florian Lugou <florian.lugou@provenrun.com> wrote:
>
> As per the description of the HCR_EL2.APK field in the ARMv8 ARM,
> Pointer Authentication keys accesses should only be trapped to Secure
> EL2 if it is enabled.
>
> Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
> ---
> target/arm/helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-19 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 14:52 [PATCH] target/arm: Fix PAuth keys access checks for disabled SEL2 Florian Lugou
2022-05-17 17:44 ` Richard Henderson
2022-05-19 10:23 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.