From nobody Mon Apr 11 02:07:47 2022 X-Original-To: dev-commits-src-branches@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 6DAA71A92D1A; Mon, 11 Apr 2022 02:07:48 +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 4KcC1H6Dn8z3LZq; Mon, 11 Apr 2022 02:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649642867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9BBH04mDN92mn2Ge2mKQHNh0P5hXz8I5d06Gm8OUN+k=; b=sPKh0u6Y8Zt2B7TtIud0Vo2CsnlR1GP9dloDys/JjjBTQ3v5JmGNWCtcgKCmQrwrO2RrYj RVIIkjoU6doU66hHFA1X2fOZLnN4m30mzLnfIeXMRj3zEDkRFxwq4fl2xXImuzF+8mVxU4 vKzrH5UMvaTB3DZxBUQ31mg9DYHQ1O7mjeB9sseC1y3OWDQa+B5sQ55+0C9e06GE4sYlGT NbBdo8VA4Bp2rguBJNSLb+AAyD1pESyay6lkBi8sUo/ycQMmgbwMrl+KNBSv7oi697lTJA Wa7xLExHGOPqPzPZhJwrtCaUVaOU7InpVVv+QG9fEmoSryBJ21NJUNAY6ro3TA== 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 A900A1A423; Mon, 11 Apr 2022 02:07:47 +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 23B27l8N086413; Mon, 11 Apr 2022 02:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23B27lwb086412; Mon, 11 Apr 2022 02:07:47 GMT (envelope-from git) Date: Mon, 11 Apr 2022 02:07:47 GMT Message-Id: <202204110207.23B27lwb086412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 52122fa0968f - stable/12 - Add `kern.features.witness` List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 52122fa0968fdaaacf3803e711604d4600d489ff Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649642867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9BBH04mDN92mn2Ge2mKQHNh0P5hXz8I5d06Gm8OUN+k=; b=o0+9UjE+KcUQUuXupcc/DuFICku8YeM8VMsDeBgE76ewdF3kBW8GqXvjwYII9PbtjyZ3Zr srcaX3kzB017dl92LSjhPzyNGybTDM0w0ObqqptFisSygGn5/COPkxA9xC2wwkGUm2wn1j sYqqzTyHIfb+LB0JluJ6D20SpcPSUpffHFd17fNN8x9H4xqJIRbRDzZFK1aqltQ3Ls+I05 Gm0TKS3T7ZNgxjqXcMJcsvC/seD/CBz/QNIwC6WNPVLnaCVQsP8tTw0kv5L4o2RU2nxWF1 dITQe7BgndwYx53r6w5LT3Dbir96Momr5ZFPw6aOWIHRhV+L+/1P4sA979nIEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649642867; a=rsa-sha256; cv=none; b=d9mqy8mYsFByb9zwn8NeNNAT5/SDSZno2ANgylkKOPSR0F3gflku3KqAZc4i1m/Z1mGU3f rHtsRZl9O8OdiKEYl8dJZ3HH6ECww+HMa3m35RjzjPu7rMAYTim5s+rMIAIZxwpNsDVX2p CeAocfi4VoN4MX94VZWIIFADANie1029v268R6K04DDipH5QP0qK2CklFZoJEPTQy4xCFf RQ+SlNwWff/o0K88l7Q2Ellhxt7X8fKi5mu1NuRR+hvsgO5iebSbsxZ40QBTGUIoY4KD8l U1oxwpI6IA85pZDyUMneme3bcSIhIWNZlhDPHL3IYjDi4qDW3UT2JWy7j6jwkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=52122fa0968fdaaacf3803e711604d4600d489ff commit 52122fa0968fdaaacf3803e711604d4600d489ff Author: Enji Cooper AuthorDate: 2020-06-24 18:51:01 +0000 Commit: Enji Cooper CommitDate: 2022-04-11 01:29:17 +0000 Add `kern.features.witness` Adding `kern.features.witness` helps expose whether or not the kernel has `options WITNESS` enabled, so the `feature_present(3)` API can be used to query whether or not witness(9) is built into the kernel. This support is helpful with userspace applications (generally speaking, tests), as it can be queried to determine whether or not tests related to WITNESS should be run. MFC after: 1 week Reviewed by: cem, darrick.freebsd_gmail.com Differential Revision: https://reviews.freebsd.org/D25302 Sponsored by: DellEMC Isilon Conflicts: sys/kern/subr_witness.c (cherry picked from commit d6701b6c8ccf35c66d357fe02494d0f60ee62f4e) --- sys/kern/subr_witness.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 3d140beb70cf..e88535f69b69 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -360,6 +360,8 @@ static int witness_output(const char *fmt, ...) __printflike(1, 2); static int witness_voutput(const char *fmt, va_list ap) __printflike(1, 0); static void witness_setflag(struct lock_object *lock, int flag, int set); +FEATURE(witness, "kernel has witness(9) support"); + static SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, NULL, "Witness Locking");