syscalls.master: Add a new syscall type: RESERVED
RESERVED syscall number are reserved for local/vendor use. RESERVED is identical to UNIMPL except that comments are ignored. Reviewed by: kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27988
This commit is contained in:
parent
65a524b499
commit
119fa6ee8a
@ -11,7 +11,7 @@
|
|||||||
; there is no audit event for the call at this time. For the
|
; there is no audit event for the call at this time. For the
|
||||||
; case where the event exists, but we don't want auditing, the
|
; case where the event exists, but we don't want auditing, the
|
||||||
; event should be #defined to AUE_NULL in audit_kevents.h.
|
; event should be #defined to AUE_NULL in audit_kevents.h.
|
||||||
; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
|
; type one of STD, OBSOL, RESERVED, UNIMPL, COMPAT, COMPAT4, COMPAT6,
|
||||||
; COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD
|
; COMPAT7, COMPAT11, COMPAT12, NODEF, NOARGS, NOPROTO, NOSTD
|
||||||
; The COMPAT* options may be combined with one or more NO*
|
; The COMPAT* options may be combined with one or more NO*
|
||||||
; options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
|
; options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
|
||||||
@ -32,6 +32,7 @@
|
|||||||
; COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat)
|
; COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat)
|
||||||
; COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat)
|
; COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat)
|
||||||
; OBSOL obsolete, not included in system, only specifies name
|
; OBSOL obsolete, not included in system, only specifies name
|
||||||
|
; RESERVED reserved for local or vendor use
|
||||||
; UNIMPL not implemented, placeholder only
|
; UNIMPL not implemented, placeholder only
|
||||||
; NOSTD implemented but as a lkm that can be statically
|
; NOSTD implemented but as a lkm that can be statically
|
||||||
; compiled in; sysent entry will be filled with lkmressys
|
; compiled in; sysent entry will be filled with lkmressys
|
||||||
|
@ -144,12 +144,13 @@ local known_abi_flags = {
|
|||||||
local known_flags = {
|
local known_flags = {
|
||||||
STD = 0x00000001,
|
STD = 0x00000001,
|
||||||
OBSOL = 0x00000002,
|
OBSOL = 0x00000002,
|
||||||
UNIMPL = 0x00000004,
|
RESERVED = 0x00000004,
|
||||||
NODEF = 0x00000008,
|
UNIMPL = 0x00000008,
|
||||||
NOARGS = 0x00000010,
|
NODEF = 0x00000010,
|
||||||
NOPROTO = 0x00000020,
|
NOARGS = 0x00000020,
|
||||||
NOSTD = 0x00000040,
|
NOPROTO = 0x00000040,
|
||||||
NOTSTATIC = 0x00000080,
|
NOSTD = 0x00000080,
|
||||||
|
NOTSTATIC = 0x00000100,
|
||||||
|
|
||||||
-- Compat flags start from here. We have plenty of space.
|
-- Compat flags start from here. We have plenty of space.
|
||||||
}
|
}
|
||||||
@ -905,6 +906,10 @@ local function handle_unimpl(sysnum, sysstart, sysend, comment)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function handle_reserved(sysnum, sysstart, sysend, comment)
|
||||||
|
handle_unimpl(sysnum, sysstart, sysend, "reserved for local use")
|
||||||
|
end
|
||||||
|
|
||||||
process_syscall_def = function(line)
|
process_syscall_def = function(line)
|
||||||
local sysstart, sysend, flags, funcname, sysflags
|
local sysstart, sysend, flags, funcname, sysflags
|
||||||
local thr_flag, syscallret
|
local thr_flag, syscallret
|
||||||
@ -949,8 +954,8 @@ process_syscall_def = function(line)
|
|||||||
flags = flags | known_flags[flag]
|
flags = flags | known_flags[flag]
|
||||||
end
|
end
|
||||||
|
|
||||||
if (flags & known_flags["UNIMPL"]) == 0 and sysnum == nil then
|
if (flags & get_mask({"RESERVED", "UNIMPL"})) == 0 and sysnum == nil then
|
||||||
abort(1, "Range only allowed with UNIMPL: " .. line)
|
abort(1, "Range only allowed with RESERVED and UNIMPL: " .. line)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (flags & known_flags["NOTSTATIC"]) ~= 0 then
|
if (flags & known_flags["NOTSTATIC"]) ~= 0 then
|
||||||
@ -1114,6 +1119,8 @@ process_syscall_def = function(line)
|
|||||||
argalias)
|
argalias)
|
||||||
elseif flags & known_flags["OBSOL"] ~= 0 then
|
elseif flags & known_flags["OBSOL"] ~= 0 then
|
||||||
handle_obsol(sysnum, funcname, funcomment)
|
handle_obsol(sysnum, funcname, funcomment)
|
||||||
|
elseif flags & known_flags["RESERVED"] ~= 0 then
|
||||||
|
handle_reserved(sysnum, sysstart, sysend)
|
||||||
elseif flags & known_flags["UNIMPL"] ~= 0 then
|
elseif flags & known_flags["UNIMPL"] ~= 0 then
|
||||||
handle_unimpl(sysnum, sysstart, sysend, funcomment)
|
handle_unimpl(sysnum, sysstart, sysend, funcomment)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user