qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] bsd-user 2023 Q2 first batch
@ 2023-04-05 21:35 Warner Losh
  2023-04-05 21:35 ` [PATCH 01/16] bsd-user: Make print_* public Warner Losh
                   ` (15 more replies)
  0 siblings, 16 replies; 38+ messages in thread
From: Warner Losh @ 2023-04-05 21:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: reinoud, riastradh, ryoon, jrtc27, Warner Losh, kevans,
	Brad Smith

This series is a number of misc cleanups.

First, this replaces my plans to remove netbsd and openbsd code entirely. I've
been in contact with the NetBSD folks that would like to make things work. The
plan is that I'll not remove it in qemu-project, and restore them in bsd-user
fork. These changes clean up some of the mess that's here: I've moved the bits
that make sense here, and removed the ones that don't (but upstream I've moved
them when it makes sense). My intention is to work with the NetBSD folks (and
OpenBSD too if they want) to cope with the structural issues I'm aware of in
bsd-user fork. Future contributions should go via that route at a rate of
contributions (I have little time to do the work, but will commit to finding
time to do the coordination and review work).

Next I've #ifdef'd some mmap handling based on certain flags being defined or
not. This was something I'd removed before, and were in what Taylor sent me, so
I've restored the relevant ones. The rest of the patch that Taylor sent me
conflicts with bsd-user and needs some work to get it in upstream. I removed a
few unused mmap defines as well. And I cleanup mmap.c to remove gratuitous
differences and pass checkpatch.pl.

Next, I've made unimplmeneted system calls generate SIGSYS. For the moment, this
is the best we should do since so much is unimplemented and as things get
implemented this will allow controlled testing of code to ensure it doesn't
silently succeed, giving the impression things are working when they aren't. I
also add SIGSYS to the uncaught coredump signal list, to match FreeBSD's
behavior. I only do this on arm, though, because the signal implementation on
x86 is incomplete (even upstream) and I didn't want to take chances.

Finally, I've included the core dump code. There's about 600 lines of sysctl
support that I've included as separate commits of ~150 lines each (and
incidentlaly, added the translation to os-sys.c for those bits). The core dump
code itself is largely copied from linux-user/elfload.c by sson (so he gets the
author credit). I moved it to elfcore.c when I was upstremaing in the past and
upstreamed a stub. One of the patches in this series replaces elfcore.c and is
1300 lines long. It's not easily sliced up into smaller bits that compile, but
I'm open to suggestions. It's known to "work" in the sense that it will generate
core files that gdb can read and intelligently parse.

This patch series is for after 8.0 is done, but before any GSoC projects start,
and will be independent of any GSoC contribution tasks.

Stacey Son (6):
  bsd-user: h2g_rusage
  bsd-user: Implmenet do_sysctl_kern_getprocs
  bsd-user: Implement do_sysctl_kern_proc_filedesc
  bsd-user: Implement do_sysctl_kern_proc_vmmap
  bsd-user: Implement sysctl kern.proc, except kern.proc.full_path
  bsd-user: Implment core dumps

Warner Losh (10):
  bsd-user: Make print_* public
  bsd-user: Ifdef a few MAP_ constants for NetBSD
  bsd-user: Cleanup style.
  bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c
  bsd-user: Remove NetBSD specific syscall printing
  bsd-user: Remove OpenBSD specific syscall printing
  bsd-user: Move system call include to os-syscall.h
  bsd-user: Remove useless mmap definitions
  bsd-user: Add SIGSYS to core dump signals.
  bsd-user: Implement SIGSYS on arm

 bsd-user/arm/target_arch_cpu.h |    8 +
 bsd-user/bsd-proc.c            |   48 ++
 bsd-user/elfcore.c             | 1318 +++++++++++++++++++++++++++++++-
 bsd-user/freebsd/os-sys.c      |  508 +++++++++++-
 bsd-user/freebsd/os-syscall.c  |   19 +
 bsd-user/freebsd/os-syscall.h  |   21 +
 bsd-user/meson.build           |    1 +
 bsd-user/mmap.c                |  101 ++-
 bsd-user/netbsd/os-syscall.h   |   16 +
 bsd-user/openbsd/os-syscall.h  |   16 +
 bsd-user/qemu-bsd.h            |   30 +
 bsd-user/qemu.h                |   44 +-
 bsd-user/signal.c              |   13 +-
 bsd-user/strace.c              |   88 +--
 bsd-user/syscall_defs.h        |   69 +-
 15 files changed, 2106 insertions(+), 194 deletions(-)
 create mode 100644 bsd-user/bsd-proc.c
 create mode 100644 bsd-user/freebsd/os-syscall.h
 create mode 100644 bsd-user/netbsd/os-syscall.h
 create mode 100644 bsd-user/openbsd/os-syscall.h
 create mode 100644 bsd-user/qemu-bsd.h

-- 
2.40.0



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

end of thread, other threads:[~2023-04-10 18:58 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 21:35 [PATCH 00/16] bsd-user 2023 Q2 first batch Warner Losh
2023-04-05 21:35 ` [PATCH 01/16] bsd-user: Make print_* public Warner Losh
2023-04-08 19:00   ` Richard Henderson
2023-04-05 21:35 ` [PATCH 02/16] bsd-user: Ifdef a few MAP_ constants for NetBSD Warner Losh
2023-04-08 19:03   ` Richard Henderson
2023-04-08 19:29     ` Warner Losh
2023-04-05 21:35 ` [PATCH 03/16] bsd-user: Cleanup style Warner Losh
2023-04-08 19:03   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 04/16] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c Warner Losh
2023-04-08 19:04   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 05/16] bsd-user: Remove NetBSD specific syscall printing Warner Losh
2023-04-08 19:04   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 06/16] bsd-user: Remove OpenBSD " Warner Losh
2023-04-08 19:05   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 07/16] bsd-user: Move system call include to os-syscall.h Warner Losh
2023-04-08 19:08   ` Richard Henderson
2023-04-10 17:12     ` Warner Losh
2023-04-10 18:57       ` Richard Henderson
2023-04-05 21:36 ` [PATCH 08/16] bsd-user: Remove useless mmap definitions Warner Losh
2023-04-08 19:09   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 09/16] bsd-user: h2g_rusage Warner Losh
2023-04-08 19:10   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 10/16] bsd-user: Implmenet do_sysctl_kern_getprocs Warner Losh
2023-04-08 19:11   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 11/16] bsd-user: Implement do_sysctl_kern_proc_filedesc Warner Losh
2023-04-08 19:12   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 12/16] bsd-user: Implement do_sysctl_kern_proc_vmmap Warner Losh
2023-04-08 19:12   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 13/16] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path Warner Losh
2023-04-08 19:13   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 14/16] bsd-user: Implment core dumps Warner Losh
2023-04-08 19:15   ` Richard Henderson
2023-04-09  5:00     ` Warner Losh
2023-04-10 17:09       ` Warner Losh
2023-04-05 21:36 ` [PATCH 15/16] bsd-user: Add SIGSYS to core dump signals Warner Losh
2023-04-08 19:15   ` Richard Henderson
2023-04-05 21:36 ` [PATCH 16/16] bsd-user: Implement SIGSYS on arm Warner Losh
2023-04-08 19:16   ` Richard Henderson

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