Re: [Qemu-devel] [PATCH 4/6] linux-user: Initialize aarch64 pac keys

2019-02-01 Thread Richard Henderson
On 2/1/19 7:11 AM, Peter Maydell wrote: > On Fri, 25 Jan 2019 at 22:57, Richard Henderson > wrote: >> >> Initialize the keys to a non-zero value on process start. >> >> Signed-off-by: Richard Henderson > >> +static uint64_t arm_rand64(void) >> +{ >> +int shift = 64 - clz64(RAND_MAX); >> +

Re: [Qemu-devel] [PATCH 4/6] linux-user: Initialize aarch64 pac keys

2019-02-01 Thread Peter Maydell
On Fri, 25 Jan 2019 at 22:57, Richard Henderson wrote: > > Initialize the keys to a non-zero value on process start. > > Signed-off-by: Richard Henderson > +static uint64_t arm_rand64(void) > +{ > +int shift = 64 - clz64(RAND_MAX); > +int i, n = 64 / shift + (64 % shift != 0); > +uin

[Qemu-devel] [PATCH 4/6] linux-user: Initialize aarch64 pac keys

2019-01-25 Thread Richard Henderson
Initialize the keys to a non-zero value on process start. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 2 ++ linux-user/aarch64/cpu_loop.c | 31 +++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/linux-user/aarch64/t