Skip to content

bsd-user: Generate system call numbers

Warner Losh qemu-devel 4 versions – New

Get series with b4
b4 am [email protected] change-id 20260412-syscall-nr-a0a831fce9a0

Versions newest first

  1. v4 Latest4 patches 0 repliesNew
  2. v34 patches 0 repliesSuperseded
  3. v25 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches7 repliesSuperseded

Changes in v4 from the cover letter

- Uggg... Fix last-second error in last commit
- Link to v3: https://lore.kernel.org/qemu-devel/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4bsd-user: Add syscall header generator for FreeBSDbsd-user/freebsd/meson.build bsd-user/freebsd/scripts/syscallhdr.sh+17 -20 replies
2/4bsd-user: Delete sbrk and sstk system calls.bsd-user/bsd-mem.h bsd-user/freebsd/os-syscall.c bsd-user/freebsd/strace.list+6 -80 replies
3/4bsd-user: Create os-syscall.hbsd-user/freebsd/os-syscall.h+21 -00 replies
4/4bsd-user: Switch to generated syscall_nr.hbsd-user/freebsd/syscall_nr.h bsd-user/syscall_defs.h+1 -5320 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPierrick BouvierPhilippe Mathieu-Daudé
1/4R-b R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] bsd-user: Generate system call numbers

FreeBSD has a system call number header, sys/syscall.h, that's installed on every system that can compile qemu. Generate the system call numbers from that table rather than re-regenerating it yet again.

To do this, I have to clean up a few stragglers for system calls we've removed. But these returned not supported anyway, so there's no net change.

I also tried to do this in a way that the other bsds can coexist with should they show up again in the future. To that end, I moved the definition of time_t into os-syscall.h, where I noticed it was wrong for amd64 targets (which is little used and missing features, so it went unnoticed for a long time).

More will be generated in the future, but this is the first steps.

Finally, while this does add files, no adjustment to MAINTAINERS is needed.

---
Changes in v4:
- Uggg... Fix last-second error in last commit
- Link to v3: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v3:
- Drop the strace stuff, since I thought it was ready, but not quite.
- Drop extra files included in bsd-user/freebsd/meson.build (soon though)
- Link to v2: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v2:
- Rebase to tip of master after 11.0 release
- Regenerate strace.list, can't do this at runtime just yet so include script
- Simplified syscall generator meson integration.
- Link to v1: https://lore.kernel.org/qemu-devel/[email protected]

---
Warner Losh (4):
bsd-user: Add syscall header generator for FreeBSD
bsd-user: Delete sbrk and sstk system calls.
bsd-user: Create os-syscall.h
bsd-user: Switch to generated syscall_nr.h

 bsd-user/bsd-mem.h                     |   2 +
 bsd-user/freebsd/meson.build           |  10 +-
 bsd-user/freebsd/os-syscall.c          |   8 -
 bsd-user/freebsd/os-syscall.h          |  21 ++
 bsd-user/freebsd/scripts/syscallhdr.sh |   9 +
 bsd-user/freebsd/strace.list           |   4 +
 bsd-user/freebsd/syscall_nr.h          | 515 ---------------------------------
 bsd-user/syscall_defs.h                |  18 +-
 8 files changed, 45 insertions(+), 542 deletions(-)

---
base-commit: 759c456b1d22fe4083c8b384da27d3f56fd53f82
change-id: 20260412-syscall-nr-a0a831fce9a0

Best regards,

Signature · 1 line
Warner Losh <[email protected]>