From nobody Tue Oct 19 23:20:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8B5E917F761E; Tue, 19 Oct 2021 23:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HYqV930bfz4bb9; Tue, 19 Oct 2021 23:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46ECC1CB4A; Tue, 19 Oct 2021 23:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19JNKXLh031218; Tue, 19 Oct 2021 23:20:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19JNKXd2031217; Tue, 19 Oct 2021 23:20:33 GMT (envelope-from git) Date: Tue, 19 Oct 2021 23:20:33 GMT Message-Id: <202110192320.19JNKXd2031217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 81184e92e0d7 - stable/13 - makesyscalls.lua: Add a new syscall type: RESERVED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 81184e92e0d73714096bd49857670e3629994ce2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=81184e92e0d73714096bd49857670e3629994ce2 commit 81184e92e0d73714096bd49857670e3629994ce2 Author: Brooks Davis AuthorDate: 2021-10-19 23:19:56 +0000 Commit: Brooks Davis CommitDate: 2021-10-19 23:19:56 +0000 makesyscalls.lua: 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 (cherry picked from commit 119fa6ee8a8056aab5e4ab1719d3c563cdb4a95a) --- sys/kern/syscalls.master | 3 ++- sys/tools/makesyscalls.lua | 23 +++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index d3ec771aac6f..81f016a0c073 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -11,7 +11,7 @@ ; 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 ; 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 ; The COMPAT* options may be combined with one or more NO* ; options separated by '|' with no spaces (e.g. COMPAT|NOARGS) @@ -32,6 +32,7 @@ ; COMPAT11 included on COMPAT_FREEBSD11 #ifdef (FreeBSD 11 compat) ; COMPAT12 included on COMPAT_FREEBSD12 #ifdef (FreeBSD 12 compat) ; OBSOL obsolete, not included in system, only specifies name +; RESERVED reserved for local or vendor use ; UNIMPL not implemented, placeholder only ; NOSTD implemented but as a lkm that can be statically ; compiled in; sysent entry will be filled with lkmressys diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 85b76a44150c..49a9e283e646 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -148,12 +148,13 @@ local known_abi_flags = { local known_flags = { STD = 0x00000001, OBSOL = 0x00000002, - UNIMPL = 0x00000004, - NODEF = 0x00000008, - NOARGS = 0x00000010, - NOPROTO = 0x00000020, - NOSTD = 0x00000040, - NOTSTATIC = 0x00000080, + RESERVED = 0x00000004, + UNIMPL = 0x00000008, + NODEF = 0x00000010, + NOARGS = 0x00000020, + NOPROTO = 0x00000040, + NOSTD = 0x00000080, + NOTSTATIC = 0x00000100, -- Compat flags start from here. We have plenty of space. } @@ -906,6 +907,10 @@ local function handle_unimpl(sysnum, sysstart, sysend, comment) 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) local sysstart, sysend, flags, funcname, sysflags local thr_flag, syscallret @@ -950,8 +955,8 @@ process_syscall_def = function(line) flags = flags | known_flags[flag] end - if (flags & known_flags["UNIMPL"]) == 0 and sysnum == nil then - abort(1, "Range only allowed with UNIMPL: " .. line) + if (flags & get_mask({"RESERVED", "UNIMPL"})) == 0 and sysnum == nil then + abort(1, "Range only allowed with RESERVED and UNIMPL: " .. line) end if (flags & known_flags["NOTSTATIC"]) ~= 0 then @@ -1115,6 +1120,8 @@ process_syscall_def = function(line) argalias) elseif flags & known_flags["OBSOL"] ~= 0 then handle_obsol(sysnum, funcname, funcomment) + elseif flags & known_flags["RESERVED"] ~= 0 then + handle_reserved(sysnum, sysstart, sysend) elseif flags & known_flags["UNIMPL"] ~= 0 then handle_unimpl(sysnum, sysstart, sysend, funcomment) else