[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] target/arm: actually enable PAuth in user m
Re: [Qemu-devel] [PATCH 2/3] target/arm: actually enable PAuth in user mode
Fri, 25 Jan 2019 15:34:51 -0800
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
On 1/25/19 1:49 PM, Rémi Denis-Courmont wrote:
> From: Remi Denis-Courmont <address@hidden>
> This always enables IA, IB, DA and DB keys in user mode on the maximum
> CPU, in a manner that is consistent with the other CPUs. That is to say
> redefining the reset value of SCTLR_ELx registers.
> Without this patch, the PAC* and AUT* instructions have no effects
> (except PACGA of course).
> Signed-off-by: Remi Denis-Courmont <address@hidden>
> target/arm/cpu64.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
> index e9bc461c36..148c103ca4 100644
> --- a/target/arm/cpu64.c
> +++ b/target/arm/cpu64.c
> @@ -413,8 +413,8 @@ static void aarch64_max_initfn(Object *obj)
> (void *)&apdb_bit, &error_fatal);
> /* Enable all PAC keys by default. */
> - cpu->env.cp15.sctlr_el |= SCTLR_EnIA | SCTLR_EnIB;
> - cpu->env.cp15.sctlr_el |= SCTLR_EnDA | SCTLR_EnDB;
> + cpu->reset_sctlr |= SCTLR_EnIA | SCTLR_EnIB;
> + cpu->reset_sctlr |= SCTLR_EnDA | SCTLR_EnDB;
I just sent another patch for this:
This way is valid as well, but would also need to adjust the property callbacks
to modify reset_sctlr as well.
Peter, do you have a preference?