All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/30] bsd-user: upstream our signal implementation
@ 2022-01-09 16:18 Warner Losh
  2022-01-09 16:18 ` [PATCH 01/30] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user Warner Losh
                   ` (29 more replies)
  0 siblings, 30 replies; 105+ messages in thread
From: Warner Losh @ 2022-01-09 16:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kyle Evans, Warner Losh

Upstream the bsd-user fork signal implementation, for the most part.  This
series of commits represents nearly all of the infrastructure that surround
signals, except the actual system call glue (that was also reworked in the
fork and needs its own series). In addition, this adds the sigsegv and sigbus
code to arm. Even in the fork, we don't have good x86 signal implementation,
so there's little to upstream for that at the moment.

bsd-user's signal implementation is similar to linux-user's. However, all
signals are always queued for batch processing (except synchronous ones that
kill the process). The full context can be found in the fork's 'blitz branch'
at https://github.com/qemu-bsd-user/qemu-bsd-user/tree/blitz which shows how
these are used to implement various system calls. Since this was built from
linux-user's stack stuff, evolved for BSD with the passage of a few years,
it no-doubt missed some bug fixes from linux-user (though nothing obvious
stood out in the quick comparison I made).

I lumped thinks slightly larger than past patch sets, but none of the patches
should exceed about 100 lines of diffs (there is one that clocks in at 166
though, but I had trouble splitting it smaller). With over 30k lines of diffs
between the two repos, I need to find more efficient ways of getting things
reviewed and each extra chunk takes time to curate so I'm searching for a good
happy medium.

Warner Losh (30):
  bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user
  bsd-user/signal.c: implement force_sig_fault
  bsd-user/signal.c: Implement cpu_loop_exit_sigsegv
  bsd-user/signal.c: implement cpu_loop_exit_sigbus
  bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together
  bsd-user/arm/target_arch_cpu.h: Correct code pointer
  bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF
  bsd-user/arm/target_arch_cpu.h: Implement data faults
  bsd-user/signal.c: implement abstract target / host signal translation
  bsd-user/signal.c: Implement signal_init()
  bsd-user/host/arm/host-signal.h: Implement host_signal_*
  bsd-user/host/i386/host-signal.h: Implement host_signal_*
  bsd-user/host/x86_64/host-signal.h: Implement host_signal_*
  bsd-user: Add host signals to the build
  bsd-user: Add trace events for bsd-usr
  bsd-user/signal.c: host_to_target_siginfo_noswap
  bsd-user/signal.c: Implement rewind_if_in_safe_syscall
  bsd-user/signal.c: Implement host_signal_handler
  bsd-user/strace.c: print_taken_signal
  bsd-user/signal.c: core_dump_signal
  bsd-user/signal.c: force_sig
  bsd-user/signal.c: Fill in queue_signal
  bsd-user/signal.c: sigset manipulation routines.
  bsd-user/signal.c: setup_frame
  bsd-user/signal.c: handle_pending_signal
  bsd-user/signal.c: tswap_siginfo
  bsd-user/signal.c: process_pending_signals
  bsd-user/signal.c: implement do_sigreturn
  bsd-user/signal.c: implement do_sigaction
  bsd-user/signal.c: do_sigaltstack

 bsd-user/arm/target_arch_cpu.h     |   91 +--
 bsd-user/host/arm/host-signal.h    |   39 ++
 bsd-user/host/i386/host-signal.h   |   37 +
 bsd-user/host/x86_64/host-signal.h |   37 +
 bsd-user/meson.build               |    1 +
 bsd-user/qemu.h                    |   46 +-
 bsd-user/signal-common.h           |   14 +
 bsd-user/signal.c                  | 1001 +++++++++++++++++++++++++++-
 bsd-user/strace.c                  |   97 +++
 bsd-user/syscall_defs.h            |    1 +
 bsd-user/trace-events              |   11 +
 bsd-user/trace.h                   |    1 +
 meson.build                        |    6 +-
 13 files changed, 1327 insertions(+), 55 deletions(-)
 create mode 100644 bsd-user/host/arm/host-signal.h
 create mode 100644 bsd-user/host/i386/host-signal.h
 create mode 100644 bsd-user/host/x86_64/host-signal.h
 create mode 100644 bsd-user/signal-common.h
 create mode 100644 bsd-user/trace-events
 create mode 100644 bsd-user/trace.h

-- 
2.33.1



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

end of thread, other threads:[~2022-01-24 21:48 UTC | newest]

Thread overview: 105+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 16:18 [PATCH 00/30] bsd-user: upstream our signal implementation Warner Losh
2022-01-09 16:18 ` [PATCH 01/30] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user Warner Losh
2022-01-13 15:47   ` Peter Maydell
2022-01-23 21:30   ` Richard Henderson
2022-01-09 16:18 ` [PATCH 02/30] bsd-user/signal.c: implement force_sig_fault Warner Losh
2022-01-13 16:43   ` Peter Maydell
2022-01-23 21:36   ` Richard Henderson
2022-01-09 16:18 ` [PATCH 03/30] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv Warner Losh
2022-01-13 17:00   ` Peter Maydell
2022-01-23 21:38   ` Richard Henderson
2022-01-09 16:18 ` [PATCH 04/30] bsd-user/signal.c: implement cpu_loop_exit_sigbus Warner Losh
2022-01-13 17:00   ` Peter Maydell
2022-01-23 21:38   ` Richard Henderson
2022-01-09 16:18 ` [PATCH 05/30] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together Warner Losh
2022-01-13 17:13   ` Peter Maydell
2022-01-14  6:33     ` Warner Losh
2022-01-23 21:40   ` Richard Henderson
2022-01-09 16:18 ` [PATCH 06/30] bsd-user/arm/target_arch_cpu.h: Correct code pointer Warner Losh
2022-01-13 17:15   ` Peter Maydell
2022-01-14  6:38     ` Warner Losh
2022-01-14 10:22       ` Peter Maydell
2022-01-17  4:12         ` Warner Losh
2022-01-23 21:43   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 07/30] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF Warner Losh
2022-01-13 17:19   ` Peter Maydell
2022-01-23 22:07     ` Richard Henderson
2022-01-09 16:19 ` [PATCH 08/30] bsd-user/arm/target_arch_cpu.h: Implement data faults Warner Losh
2022-01-13 17:40   ` Peter Maydell
2022-01-14 18:13     ` Warner Losh
2022-01-14 18:21       ` Peter Maydell
2022-01-24  1:12   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 09/30] bsd-user/signal.c: implement abstract target / host signal translation Warner Losh
2022-01-13 17:44   ` Peter Maydell
2022-01-14 18:27     ` Warner Losh
2022-01-09 16:19 ` [PATCH 10/30] bsd-user/signal.c: Implement signal_init() Warner Losh
2022-01-13 19:28   ` Peter Maydell
2022-01-14 18:51     ` Warner Losh
2022-01-24  1:38   ` Richard Henderson
2022-01-24 21:35     ` Warner Losh
2022-01-09 16:19 ` [PATCH 11/30] bsd-user/host/arm/host-signal.h: Implement host_signal_* Warner Losh
2022-01-13 19:32   ` Peter Maydell
2022-01-17  3:53     ` Warner Losh
2022-01-09 16:19 ` [PATCH 12/30] bsd-user/host/i386/host-signal.h: " Warner Losh
2022-01-13 19:33   ` Peter Maydell
2022-01-24  1:49   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 13/30] bsd-user/host/x86_64/host-signal.h: " Warner Losh
2022-01-13 19:33   ` Peter Maydell
2022-01-24  1:52   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 14/30] bsd-user: Add host signals to the build Warner Losh
2022-01-13 19:35   ` Peter Maydell
2022-01-24  1:56   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 15/30] bsd-user: Add trace events for bsd-usr Warner Losh
2022-01-13 19:37   ` Peter Maydell
2022-01-24  1:57   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap Warner Losh
2022-01-13 19:43   ` Peter Maydell
2022-01-15  6:19     ` Warner Losh
2022-01-15 11:08       ` Peter Maydell
2022-01-24  2:05   ` Richard Henderson
2022-01-24 21:45     ` Warner Losh
2022-01-09 16:19 ` [PATCH 17/30] bsd-user/signal.c: Implement rewind_if_in_safe_syscall Warner Losh
2022-01-13 19:44   ` Peter Maydell
2022-01-24  2:09   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 18/30] bsd-user/signal.c: Implement host_signal_handler Warner Losh
2022-01-13 20:17   ` Peter Maydell
2022-01-16 20:52     ` Warner Losh
2022-01-09 16:19 ` [PATCH 19/30] bsd-user/strace.c: print_taken_signal Warner Losh
2022-01-13 20:20   ` Peter Maydell
2022-01-24  2:45   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 20/30] bsd-user/signal.c: core_dump_signal Warner Losh
2022-01-13 20:22   ` Peter Maydell
2022-01-13 20:28     ` Warner Losh
2022-01-13 20:40       ` Peter Maydell
2022-01-24  3:01   ` Richard Henderson
2022-01-09 16:19 ` [PATCH 21/30] bsd-user/signal.c: force_sig Warner Losh
2022-01-13 20:29   ` Peter Maydell
2022-01-13 20:53     ` Peter Maydell
2022-01-13 23:04       ` Kyle Evans
2022-01-18 22:27         ` Warner Losh
2022-01-09 16:19 ` [PATCH 22/30] bsd-user/signal.c: Fill in queue_signal Warner Losh
2022-01-13 20:37   ` Peter Maydell
2022-01-17 16:22     ` Warner Losh
2022-01-17 16:33       ` Peter Maydell
2022-01-09 16:19 ` [PATCH 23/30] bsd-user/signal.c: sigset manipulation routines Warner Losh
2022-01-14 11:13   ` Peter Maydell
2022-01-22 16:44     ` Warner Losh
2022-01-22 18:00       ` Kyle Evans
2022-01-09 16:19 ` [PATCH 24/30] bsd-user/signal.c: setup_frame Warner Losh
2022-01-14 11:40   ` Peter Maydell
2022-01-17  6:58     ` Warner Losh
2022-01-17  7:24       ` Warner Losh
2022-01-09 16:19 ` [PATCH 25/30] bsd-user/signal.c: handle_pending_signal Warner Losh
2022-01-14 11:50   ` Peter Maydell
2022-01-09 16:19 ` [PATCH 26/30] bsd-user/signal.c: tswap_siginfo Warner Losh
2022-01-14 11:54   ` Peter Maydell
2022-01-09 16:19 ` [PATCH 27/30] bsd-user/signal.c: process_pending_signals Warner Losh
2022-01-14 11:55   ` Peter Maydell
2022-01-17  2:09     ` Warner Losh
2022-01-09 16:19 ` [PATCH 28/30] bsd-user/signal.c: implement do_sigreturn Warner Losh
2022-01-14 12:12   ` Peter Maydell
2022-01-09 16:19 ` [PATCH 29/30] bsd-user/signal.c: implement do_sigaction Warner Losh
2022-01-14 13:13   ` Peter Maydell
2022-01-09 16:19 ` [PATCH 30/30] bsd-user/signal.c: do_sigaltstack Warner Losh
2022-01-14 13:18   ` Peter Maydell
2022-01-22 22:20     ` Warner Losh

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.