All of lore.kernel.org
 help / color / mirror / Atom feed
* GDB breakpoints and uprobes result in SIGILL or SIGSEGV on arm64 Azure VMs
@ 2023-06-29 11:06 Bogdan Harjoc
  0 siblings, 0 replies; only message in thread
From: Bogdan Harjoc @ 2023-06-29 11:06 UTC (permalink / raw)
  To: linux-arm-kernel

Arm64 machines on Microsoft Azure seem to have a bug where attaching
uprobes or gdb breakpoints on most (but not all) binaries will result
in SIGILL or SIGSEGV being delivered when execution continues after
the breakpoint:

$ gdb /bin/bash
(gdb) break readline
Breakpoint 1 at 0xd610c
(gdb) run
Breakpoint 1, 0x0000aaaaaab7610c in readline ()
(gdb) stepi
0x0000aaaaaab76110 in readline ()
(gdb) stepi
Program received signal SIGSEGV, Segmentation fault.
__strlen_asimd () at ../sysdeps/aarch64/multiarch/strlen_asimd.S:96

It looks like the second stepi unexpectedly jumps out of readline and
into __strlen_asimd, where it crashes. The same happens with lldb
instead of gdb.

The above is on an ubuntu-22.04 with kernel 6.2.0-1005-azure, but all
tested distributions and kernel versions have this issue on Azure
apparently. Other tested virtualization platforms seem unaffected.

A simple test app which registers a SIGTRAP handler and then calls
__asm__("bkpt #0"), seems to continue correctly after the handler
updates pc to skip over the bkpt opcode.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-29 11:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 11:06 GDB breakpoints and uprobes result in SIGILL or SIGSEGV on arm64 Azure VMs Bogdan Harjoc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.