From nobody Mon Apr 17 15:47:52 2023 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 4Q0WfK0dmnz44q6Z; Mon, 17 Apr 2023 15:47:53 +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 4Q0WfJ5frVz49NV; Mon, 17 Apr 2023 15:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746473; 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=23ihajh21+WkEwK8wV9MaKAnEc0LOYsCstX2QyEIH+U=; b=p8i2ug4VOoRReRRWJZEuNtsYrb2U+vL3Y0GD0aSJ/a5BvC74WmbYbER9fYdLLYgkyyV7io jdAWyIhiv5696Mgpin+HcjOQABd/BhIcpSLUdrxCJ95FoZ3e9UTlGFEWlP5Mr6FLU07unc 91pP6LViG0FoQcVMnw9OZtWk2UQ+gfL2Cqt5FK6+gT1RicYyFhbol7++rDQgK6aI4plZJf Uecmjws8tnOCLs/KmDX4+vN/V/TgZrTIaufd84BvzruIf/J73gxbBU8w8R3HiTCGR8LO/Z 96n1wiF/o6BaWVmiR+FZDJgHtpmXnTg022lOOFNDSsEiKGLEuaimZWYQEk6GHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746472; 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=23ihajh21+WkEwK8wV9MaKAnEc0LOYsCstX2QyEIH+U=; b=tbHZjm9QhQ99tW0ZFPFyelHdwRIbyHOGotT/ofHjPNtpjKmv1iffqCp/FO1YCuX8qgD794 wHZgmTXTtDOSxWAHchw7IpmRu4MpLsgpIznzT1GX1dPez2D8LeW3y7IRq4pqtfZVIXdJ54 /nhMI1Y36yEpVTpJNoCMlAkI0Zf48ruaGelAjCWOvk6ZhjgWCu0KDkBVqpKUgJzLVHdloT c+GOwcdjvdsCobnvEeFrHi/pUbssT1e1U/7jFmRvDynt7s9urKXPmBT+YG86v3Fn++JPpP 23RX3YJK0l3XRNp7XWxHloUxmcazCPS7sPmpUdE6W7Hqg/uSuWf35Y6wqXd60Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746472; a=rsa-sha256; cv=none; b=lNGIx1kApBhDSSok0wJQDL7BO7mj9HZcDx+VG3J2lPEMZlazOvVWk50cDU7kyxDtrqvT45 QrhubEqt0TIBCBu47TaMSL17j/eJL4gpvga92dSs8BwB6HxoK9DuVVPlEUBjSzO5ZuR2pB 6GE3Bc0XsTDN4mNDEncBEAZEADEUK9wyIwBSpwhskLF27c+MW1X6Kn3JmJD+bHno1yXCUC 4CR6fWcLwGSs1KVIOgazw77JSpf9q5cQO/wsij+RUVjSaVi8/wT/KqPkabQOy8Kj/QBFv/ jUZbJIceHhdwXmxCzpamBe4lSqkkZ3tX3v7YLENz6Wi/BVJaJ7VpBJmf+wlxcA== 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 4Q0WfJ4JqZzbKZ; Mon, 17 Apr 2023 15:47:52 +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 33HFlq1n070495; Mon, 17 Apr 2023 15:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFlqer070494; Mon, 17 Apr 2023 15:47:52 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:52 GMT Message-Id: <202304171547.33HFlqer070494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: d195f39d1dab - main - veriexec: Add option MAC_VERIEXEC_DEBUG 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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 commit d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 Author: Steve Kiernan AuthorDate: 2023-04-02 19:46:53 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:32 +0000 veriexec: Add option MAC_VERIEXEC_DEBUG Obtained from: Juniper Networks, Inc. --- sys/security/mac_veriexec/mac_veriexec.c | 4 +--- sys/security/mac_veriexec/mac_veriexec_internal.h | 2 +- sys/security/mac_veriexec/veriexec_metadata.c | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index d61943479ad6..57f3b6c307fa 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -67,7 +67,7 @@ #define SLOT_SET(l, v) \ mac_label_set((l), mac_veriexec_slot, (v)) -#ifdef MAC_DEBUG +#ifdef MAC_VERIEXEC_DEBUG #define MAC_VERIEXEC_DBG(_lvl, _fmt, ...) \ do { \ VERIEXEC_DEBUG((_lvl), (MAC_VERIEXEC_FULLNAME ": " _fmt \ @@ -204,10 +204,8 @@ mac_veriexec_vfs_mounted(void *arg __unused, struct mount *mp, return; SLOT_SET(mp->mnt_label, va.va_fsid); -#ifdef MAC_DEBUG MAC_VERIEXEC_DBG(3, "set fsid to %ju for mount %p", (uintmax_t)va.va_fsid, mp); -#endif } /** diff --git a/sys/security/mac_veriexec/mac_veriexec_internal.h b/sys/security/mac_veriexec/mac_veriexec_internal.h index e69f34df892e..f618ac155a83 100644 --- a/sys/security/mac_veriexec/mac_veriexec_internal.h +++ b/sys/security/mac_veriexec/mac_veriexec_internal.h @@ -41,7 +41,7 @@ #define VERIEXEC_FILES_FIRST 1 -#if defined(VERIFIED_EXEC_DEBUG) || defined(VERIFIED_EXEC_DEBUG_VERBOSE) +#ifdef MAC_VERIEXEC_DEBUG # define VERIEXEC_DEBUG(n, x) if (mac_veriexec_debug > (n)) printf x #else # define VERIEXEC_DEBUG(n, x) diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 9e99f51e7e65..4b9cc9b3052f 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -41,6 +41,9 @@ #include #include #include +#ifdef MAC_VERIEXEC_DEBUG +#include +#endif #include #include "mac_veriexec.h" @@ -548,7 +551,7 @@ mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, break; case EAUTH: -#ifdef VERIFIED_EXEC_DEBUG_VERBOSE +#ifdef MAC_VERIEXEC_DEBUG { char have[MAXFINGERPRINTLEN * 2 + 1]; char want[MAXFINGERPRINTLEN * 2 + 1];