mbox series

[0/2] linux-user: fix sparc32plus emulation

Message ID 20180402102453.9883-1-laurent@vivier.eu
Headers show
Series linux-user: fix sparc32plus emulation | expand

Message

Laurent Vivier April 2, 2018, 10:24 a.m. UTC
The sparc signal emulation is broken:
sparc has a special field called ka_restorer and to be used
in place of sa_restorer. Without it, the signal handler
exits and executes unexpected instructions.
(sparc64 has the same kind of problem but this change
doesn't fix it)

Once this problem is fixed, we can chroot in a shell and
execute "ls". And "ls" fails to read directory content
because flags of open() are not translated correctly.
To fix that, the second patch defines the good sparc
value for TARGET___O_TMPFILE.

Laurent Vivier (2):
  linux-user: define TARGET_ARCH_HAS_KA_RESTORER
  linux-user: fix TARGET___O_TMPFILE for sparc

 linux-user/signal.c       | 4 ++--
 linux-user/syscall.c      | 7 +++++--
 linux-user/syscall_defs.h | 5 +++++
 3 files changed, 12 insertions(+), 4 deletions(-)