diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-03-27 10:54:06 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-05-15 10:03:44 +0200 |
commit | 3c13b0ffe76057e93e007bedbad3cc556146e3ed (patch) | |
tree | 04c6c89b39d1ac382370910f50cb6e4c105a6d2e /target/hppa/gdbstub.c | |
parent | a0ea4becca28c1c14de5c3b8bff8343ab184070c (diff) | |
download | qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.zip qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.tar.gz qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.tar.bz2 |
linux-user/hppa: Force all code addresses to PRIV_USER
The kernel does this along the return path to user mode.
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/gdbstub.c')
-rw-r--r-- | target/hppa/gdbstub.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index 4a965b3..0daa52f 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -163,12 +163,18 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) env->cr[CR_SAR] = val & (hppa_is_pa20(env) ? 63 : 31); break; case 33: +#ifdef CONFIG_USER_ONLY + val |= PRIV_USER; +#endif env->iaoq_f = val; break; case 34: env->iasq_f = (uint64_t)val << 32; break; case 35: +#ifdef CONFIG_USER_ONLY + val |= PRIV_USER; +#endif env->iaoq_b = val; break; case 36: |