aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2021-11-22 22:36:58 +0000
committerBrooks Davis <brooks@FreeBSD.org>2021-11-22 22:36:58 +0000
commitbe67ea40c5a0fd375d754a92e6cd8a3bfc508ba3 (patch)
treed110fc4c609e6cadca7327799251f6553be611c4 /sys/kern/syscalls.master
parent799ce8b8d2a061db1ca1e379fef638e2d22b6f29 (diff)
downloadsrc-be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3.tar.gz
src-be67ea40c5a0fd375d754a92e6cd8a3bfc508ba3.zip
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master22
1 files changed, 19 insertions, 3 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index b606503e3ba3..315e2692bfa1 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -49,6 +49,24 @@
; definition to syscall.h besides adding a sysent.
; NOTSTATIC syscall is loadable
; CAPENABLED syscall is allowed in capability mode
+;
+; To support programmatic generation of both the default ABI and 32-bit compat
+; (freebsd32) we impose a number of restrictions on the types of system calls.
+; For integer types:
+; - Bare int and long are allowed (long is a sign of a bad interface).
+; - Use u_int and u_long rather than "unsigned (int|long)".
+; - size_t is allowed.
+; - typedefs are allowed, but new signed types that vary between 32- and
+; 64-bit ABIs must be added to makesyscalls.lua so it knows they require
+; handling.
+; - Always-64-bit types other than dev_t, id_t, and off_t must be added to
+; makesyscalls.lua.
+; For pointers:
+; - Prefer structs to typedefs so an ABI-specific suffix (e.g., "32") can
+; be prepended (e.g., ucontext_t -> struct ucontext -> struct ucontext32).
+; - Pointers to objects (structs, unions, etc) containing any long, pointer,
+; or time_t arguments need _Contains_ annotations. Such objects should be
+; padded such that all 64-bit types are 64-bit aligned.
; annotations:
; SAL 2.0 annotations are used to specify how system calls treat
@@ -87,14 +105,12 @@
; timet_ Object contains a time_t and varies between i386 and other
; ABIs.
-; Please copy any additions and changes to the following compatability tables:
-; sys/compat/freebsd32/syscalls.master
-
; #ifdef's, etc. may be included, and are copied to the output files.
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+%%ABI_HEADERS%%
0 AUE_NULL STD {
int nosys(void);