Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge make sysent refactor #2243

Merged
merged 15 commits into from
Nov 11, 2024
Merged

Merge make sysent refactor #2243

merged 15 commits into from
Nov 11, 2024

Conversation

brooksdavis
Copy link
Member

Merge a refactor of make sysent from upstream FreeBSD. See freebsd/freebsd-src#1362 for background.

brooksdavis and others added 15 commits October 30, 2024 21:51
Reported by:	agge3 <sterspark@gmail.com>

(cherry picked from commit 8bc14f6ba937dc080b435ac519bed334a4f0b629)
(cherry picked from commit 76ab72e8283712e508bc3f4c2b8c219b49b64d4c)
The last consumer was removed with a switch to generating freebsd32's
syscall files from sys/kern/syscalls.master in commit be67ea4.

This followed prior work to use CAPENABLED flags in syscalls.master
instead of capabilities.conf in commit df501ba.

(cherry picked from commit d6bc956e143b194c221a9e697cd45a8a62028e86)
* main.lua replicates the functionality of makesyscalls.lua
* Individual files are generated by their associated module
  * Modules can be called as standalone scripts to generate a specific
    file
* Data and procedures are performed by objects instead of procedual code
* Bitmasks are replaced by declarative types
* Temporary files are no longer produced, writing is stored in memory
* Comments provide explanation to functions and semantics

Google Summer of Code 2024 Final Work Product

Co-authored-by: Warner Losh <imp@freebsd.org>
Co-authored-by: Kyle Evans <kevans@freebsd.org>
Co-authored-by: Brooks Davis <brooks@freebsd.org>
Sponsored by:    Google (GSoC 24)
Pull Request:	freebsd/freebsd-src#1362
Signed-off-by: agge3 <sterspark@gmail.com>

(cherry picked from commit 9ded074e875c29cb92d5f643801990d7bb23cca4)
Ported from:	87ffcef Port makesyscalls.lua to CheriBSD's annotation set.
These flags are a mix of excusive types and modifer flags.  Comment the
modifer flags and sort them.

Reviewed by:	emaste
Pull Request:	freebsd/freebsd-src#1503

(cherry picked from commit 2ea829e3abfba1d6b5e81e0b5f06f3dcc0f3f72c)
The yield system call has long existed, but never had a stub.  Replace
the hardcoded checks for it in libsys_h.lua and syscalls_map.lua and
stop inserting it into MIASM (requiring libsys/Makefile.sys to disable
the stub).

(This seems like overkill, but I've got another case in CheriBSD so this
reduces my diff appreciably.)

Reviewed by:	emaste
Pull Request:	freebsd/freebsd-src#1503

(cherry picked from commit bbc0f33b1317bb922ff3d960216ce7b4af88b8af)
CHERI: also remove flag_captured

Reviewed by:	emaste
Pull Request:	freebsd/freebsd-src#1503

(cherry picked from commit 59a8b439aca5e6ef3c603f3f9814cdbd234d4947)
(cherry picked from commit 204d065dac81d6b4893054aa9124feb4ee51bf87)
All changes are no-ops and are one of:
 - Name changes of obsolete system calls in comments
 - Correct prefixes on unimplemented freebsd32 system calls
 - Currently unused macros for FreeBSD 14 compatablity

(cherry picked from commit 74231c81720235c413cca2443e3e87b3761bf141)
(cherry picked from commit bed4c839735f141d9d40c77ec23dfdf50180d902)
We haven't used this since commit be67ea4 in 2021 so stop carrying
it forward.

Also remove support for setting the list in syscalls.conf via the
capenabled variable.  This was last used by cloudabi (removed in 2021
by commit cf0ee87).

(cherry picked from commit ec86d763d1c94648419aeb931683dcb37bf72656)
It is obsolete and will be removed in a followup commit.

(cherry picked from commit 913bfd86c1b2a161c21fccaef63c1e1702560366)
System call entry generation now lives in sys/tools/syscalls/*

(cherry picked from commit 5212b9500116523828fc94d84a951949d408a1a4)
@bsdjhb bsdjhb merged commit f3071f9 into dev Nov 11, 2024
29 checks passed
@bsdjhb bsdjhb deleted the makesysent-refactor branch November 11, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants