From nobody Mon Nov 22 22:38:01 2021 X-Original-To: dev-commits-src-main@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 109FA18932E0; Mon, 22 Nov 2021 22:38:05 +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 4HyhxS0HFgz4YQn; Mon, 22 Nov 2021 22:38:04 +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 CD69B2F0F; Mon, 22 Nov 2021 22:38:01 +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 1AMMc1YK047544; Mon, 22 Nov 2021 22:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMc1aA047543; Mon, 22 Nov 2021 22:38:01 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:38:01 GMT Message-Id: <202111222238.1AMMc1aA047543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 64cc9803ab6f - main - makesyscalls: add override of ABI change detection List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 commit 64cc9803ab6fe661cf56c708e26b23d87f4b4ce6 Author: Brooks Davis AuthorDate: 2021-11-22 22:36:58 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:58 +0000 makesyscalls: add override of ABI change detection While we can detect most ABI changes through analysis of syscalls.master with suitable annotations, to cases are handled in the core implementation and others have changes that can not be infered. Add two new config variables syscall_abi_change and syscall_no_abi_change which override the detected value. Both are space-seperated lists of syscall names. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 48ad05eb0469..386a79e44eeb 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -68,6 +68,10 @@ local config = { abi_semid_t = "semid_t", abi_ptr_array_t = "", ptr_intptr_t_cast = "intptr_t", + syscall_abi_change = "", + sys_abi_change = {}, + syscall_no_abi_change = "", + sys_no_abi_change = {}, obsol = "", obsol_dict = {}, unimpl = "", @@ -391,6 +395,18 @@ local function process_unimpl() end end +local function process_syscall_abi_change() + local changes_abi = config["syscall_abi_change"] + for syscall in changes_abi:gmatch("([^ ]+)") do + config["sys_abi_change"][syscall] = true + end + + local no_changes = config["syscall_no_abi_change"] + for syscall in no_changes:gmatch("([^ ]+)") do + config["sys_no_abi_change"][syscall] = true + end +end + local function abi_changes(name) if known_abi_flags[name] == nil then abort(1, "abi_changes: unknown flag: " .. name) @@ -1197,6 +1213,9 @@ process_syscall_def = function(line) if args ~= nil then funcargs, changes_abi = process_args(args) end + if config["sys_no_abi_change"][funcname] then + changes_abi = false + end local noproto = config["abi_flags"] ~= "" and not changes_abi local argprefix = '' @@ -1204,12 +1223,19 @@ process_syscall_def = function(line) if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do if isptrtype(v["type"]) then + if config["sys_no_abi_change"][funcname] then + print("WARNING: " .. funcname .. + " in syscall_no_abi_change, but pointers args are present") + end changes_abi = true goto ptrfound end end ::ptrfound:: end + if config["sys_abi_change"][funcname] then + changes_abi = true + end if changes_abi then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname @@ -1311,6 +1337,7 @@ elseif config["capenabled"] ~= "" then end process_compat() process_abi_flags() +process_syscall_abi_change() process_obsol() process_unimpl()