qemu/linux-user/ppc
Richard Henderson 75da499733 linux-user/ppc: Fix msr updates for signal handling
In save_user_regs, there are two bugs where we OR in a bit number
instead of the bit, clobbering the low bits of MSR.  However:

The MSR_VR and MSR_SPE bits control the availability of the insns.
If the bits were not already set in MSR, then any attempt to access
those registers would result in SIGILL.

For linux-user, we always initialize MSR to the capabilities
of the cpu.  We *could* add checks vs MSR where we currently
check insn_flags and insn_flags2, but we know they match.

Also, there's a stray cut-and-paste comment in restore.

Then, do not force little-endian binaries into big-endian mode.

Finally, use ppc_store_msr for the update to affect hflags.
Which is the reason none of these bugs were previously noticed.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210323184340.619757-10-richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-05-04 11:41:25 +10:00
..
cpu_loop.c linux-user/ppc: Fix msr updates for signal handling 2021-05-04 11:41:25 +10:00
meson.build meson: linux-user 2020-08-21 06:30:38 -04:00
signal.c linux-user/ppc: Fix msr updates for signal handling 2021-05-04 11:41:25 +10:00
sockbits.h linux-user: move ppc socket.h definitions to ppc/sockbits.h 2018-05-25 10:10:55 +02:00
syscall.tbl linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
syscallhdr.sh linux-user, ppc: add syscall table generation support 2020-03-20 16:02:00 +01:00
target_cpu.h linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
target_elf.h linux-user: set default PPC64 CPU 2019-06-24 23:10:36 +02:00
target_fcntl.h linux-user: move ppc fcntl definitions to ppc/target_fcntl.h 2018-06-04 01:30:44 +02:00
target_signal.h linux-user: Correct definition of stack_t 2020-11-11 10:59:39 +01:00
target_structs.h linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
target_syscall.h linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
termbits.h linux-user: fix ppc/termbits.h 2020-09-06 12:29:19 +02:00