Skip to content

linux-user/arm: Fix BKPT, SVC immediate handling

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4linux-user/arm: BKPT should cause SIGTRAP, not be a syscalllinux-user/arm/cpu_loop.c+8 -223 replies
2/4linux-user/arm: Remove bogus SVC 0xf0002 handlinglinux-user/arm/cpu_loop.c+1 -32 replies
3/4linux-user/arm: Handle invalid arm-specific syscalls correctlylinux-user/arm/cpu_loop.c+26 -46 replies
4/4linux-user/arm: Fix identification of syscall numberslinux-user/arm/cpu_loop.c+77 -661 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéEdgar E. Iglesias
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] linux-user/arm: Fix BKPT, SVC immediate handling

This patchseries fixes issues with the code in linux-user/arm/cpu_loop.c:
* it incorrectly thinks BKPT is a syscall instruction
(https://bugs.launchpad.net/qemu/+bug/1873898, reported via irc)
* a stale line of code means we incorrectly NOP SVC #0xf0002
* we don't implement the distinction between 0x9f0000..0x9f07ff (should return -ENOSYS if not implemented) and higher numbers (should cause a SIGILL)
* we abort() for bad immediate values to SVC (ie not the 0 of EABI or the >0x9f0000 of OABI); the kernel delivers a SIGILL for these
* for Thumb mode, we never use the immediate value from the insn, but we always read it anyway

This patchseries fixes all those things. (I started out fixing the BKPT bug; everything else is problems I spotted along the way while I was reading this bit of code...)

thanks
-- PMM

Peter Maydell (4):
linux-user/arm: BKPT should cause SIGTRAP, not be a syscall linux-user/arm: Remove bogus SVC 0xf0002 handling linux-user/arm: Handle invalid arm-specific syscalls correctly linux-user/arm: Fix identification of syscall numbers

 linux-user/arm/cpu_loop.c | 145 +++++++++++++++++++++-----------------
 1 file changed, 81 insertions(+), 64 deletions(-)
Signature · 1 line
2.20.1