Page MenuHomeFreeBSD

syscalls.master: switch to CAPENABLED flags

Authored by brooks on Jul 29 2021, 8:59 PM.



Switch the main syscall table to use CAPENABLED flags rather than
capabilities.conf. This avoid synchronization issues between
syscalls.master and capabilities.conf (e.g. when renaming a syscall
during development).

For now, move capabilities.conf to sys/compat/freebsd32 and use it
there. Use of sys/compat/freebsd32/syscalls.master should be replaced
by makesyscalls.lua enhancements to allow the main one to be used.

This change results in no changes to generated files after running
make sysent.

MFC after: 1 week
Sponsored by: DARPA

Test Plan

make sysent results in no changes.

Diff Detail

R10 FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

(I've looked at up to 166)


This one was not enabled in capabilities.conf I believe? Although that might have been accidental I might argue for keeping it out (assuming I haven't missed something).


There are some comments in capabilities.conf that will be lost, perhaps we should move them here? e.g. ## Do allow sync(2) for now, but possibly shouldn't.

(Although perhaps some of the questions/XXXs have been resolved since.)


And comments like

## XXXRW: getpgid(2) needs scoping.  It's not clear if it's worth scoping
## getppid(2).  getpriority(2) needs scoping.  getrusage(2) needs scoping.
## getsid(2) needs scoping.

this one also not in capabilities.conf? (and the other COMPAT entries)


XXXRW: Kernel doesn't implement this, so drop?


freebsd 4 fstatfs was not included


(this one was explicitly enabled in capabilities.conf before)

Note: this was tested by running make sysent and verifying that nothing changed.

@rwatson might want to review the capabilities.conf XXXRW comments and see which ones should be pulled across.


It's there as lseek (I added support for matching names without o or freebsd#_ prefixes a while ago.)

That being said, I think there's an argument we should remove all the COMPAT ones prior to FreeBSD 9 since no non broken program could be calling them in capability mode. I'd prefer to do that in a separate commit and due to the feature above it can't easily be done prior to this commit.


This one is probably with dropping. The whole syscall should have been dropped ages ago. It should become freebsd13_sstk at some point.


OK, as a second commit sounds good to me.

Please include in the commit message the note wrt no change in generated files from make sysent

This revision is now accepted and ready to land.Aug 4 2021, 2:53 PM

capabilities.conf is still in the tree so the XXXRW comments still exist somewhere - we can make sure they make it into syscalls.master or somewhere appropriate before handling compat32

This revision now requires review to proceed.Wed, Sep 1, 6:11 PM
  • Handle fspacectl
  • Add a note that there is no functional change
This revision is now accepted and ready to land.Wed, Sep 1, 6:53 PM
This revision was automatically updated to reflect the committed changes.