qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] linux-user/arm: Fix BKPT, SVC immediate handling
@ 2020-04-20 21:22 Peter Maydell
  2020-04-20 21:22 ` [PATCH 1/4] linux-user/arm: BKPT should cause SIGTRAP, not be a syscall Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Peter Maydell @ 2020-04-20 21:22 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: omerg681, Riku Voipio, Laurent Vivier

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(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-05-18 15:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 21:22 [PATCH 0/4] linux-user/arm: Fix BKPT, SVC immediate handling Peter Maydell
2020-04-20 21:22 ` [PATCH 1/4] linux-user/arm: BKPT should cause SIGTRAP, not be a syscall Peter Maydell
2020-04-21  7:48   ` Edgar E. Iglesias
2020-04-21  7:48   ` Philippe Mathieu-Daudé
2020-04-21  8:48     ` Peter Maydell
2020-04-20 21:22 ` [PATCH 2/4] linux-user/arm: Remove bogus SVC 0xf0002 handling Peter Maydell
2020-04-21  7:39   ` Philippe Mathieu-Daudé
2020-04-21  7:49   ` Edgar E. Iglesias
2020-04-20 21:22 ` [PATCH 3/4] linux-user/arm: Handle invalid arm-specific syscalls correctly Peter Maydell
2020-04-21  7:36   ` Philippe Mathieu-Daudé
2020-04-21  7:44   ` Edgar E. Iglesias
2020-04-21  7:51     ` Philippe Mathieu-Daudé
2020-04-21  8:49     ` Peter Maydell
2020-04-21  9:31   ` Aleksandar Markovic
2020-04-21  9:34     ` Peter Maydell
2020-04-20 21:22 ` [PATCH 4/4] linux-user/arm: Fix identification of syscall numbers Peter Maydell
2020-04-21  7:57   ` Edgar E. Iglesias
2020-05-12 12:43 ` [PATCH 0/4] linux-user/arm: Fix BKPT, SVC immediate handling Peter Maydell
2020-05-18 15:00   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).