From nobody Wed May 15 13:22:00 2024 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 4VfYm83pV3z5Kskd; Wed, 15 May 2024 13:22:00 +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 4VfYm82tD4z428y; Wed, 15 May 2024 13:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715779320; 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=D52X0j7R6SiSd/qbHqd6+k8rVt1WUhS7eVVGQRE7zcM=; b=jZXHxVDbvLk8Rb7I+8qHH12Uost/foNTdkAtdTzeGkt5Nl34AHh9CIUzz56obFHhabh0Ad YxTy5QNoN1hnnFPwqi0FcCP/0vROyGzppTg9giVYdKVEtAM+IEaOec9O/Dk/xnkFTpzjfN 5Hua4PkefTVfUDOaEDUi5HZGAmEw6BF6RwTtYj3gD6UVUbHgRHLTbAl00B/OopFgDRtl6E fDeHfm9p+9ifL3N+anOLG4JWG9kZVFgwrb6EHJbCeQz9LZxql1YATvwdXPhdXcYHAFS4cW 0lZCrSmRXIvkHUwr8lxmgqK7VbUVF0FquvneMN/7QemhjsS99SZnONjqQ0ihpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715779320; a=rsa-sha256; cv=none; b=iMprMIRR5HrhRr5xf+UICHbJmzyTKRiLAEuexGIiznC+qkkBcujmJBsvUhMsok66c/6qpw /Cb/0BvD9HKiWFiPlQk5+kl1BbUDCxYyCRvoxe1cmVdJhqhqrLrVi175D9KLENYPYFLhl9 hwr3tXgPO3fTZooQ1QRuD8R1cHJA5cPey4HrbwaDVrV3pum//WLbPmEgRpgZF98am1hFbv 6GcZ3ns6KyZ5zkI2mip5DXs7nfBuq3kyyIcYIiPFoaSJSHNMJPSnC6XMQ3rrqPwyYYD40Y GERog/ibwaqbiKOCl0lDJMKnTKhVGaggCnp2VOSIS+WTo26ONR8jyRO+JoQjZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715779320; 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=D52X0j7R6SiSd/qbHqd6+k8rVt1WUhS7eVVGQRE7zcM=; b=Q1Vm6O/BWKir7YlznqpOZyZeAmmUV/XP0FGLlL11CMMmBauoaiZ2A2CKsMGuhoWZfLtNSz 3zzFpTVJyCfcc0wTJdQhqhKqy4HOTBEmbJ8VGXLvPzy6s/jvusXDeywFiB7a/8jGfh7Btr ZhmAO0/VWcks/Gayo05hH1sWDwhCDWBuZKPIbpIB0ScKvzth9KIgAl5dtMaztrS07Zq3eE j7O4/SWVtXN1eMqxjDGGZBWBkrHucZCEe/TpCd5ZgLiZBgHNNf7TimedKDw72mlDavaVry YySSocnkiy19KHESe54eSTqQ3EL984dMe03ynQfAD3gfTnjoFwZqKWzgEQR1Ug== 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 4VfYm82TgvzGdC; Wed, 15 May 2024 13:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44FDM0Rv093799; Wed, 15 May 2024 13:22:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44FDM0hf093797; Wed, 15 May 2024 13:22:00 GMT (envelope-from git) Date: Wed, 15 May 2024 13:22:00 GMT Message-Id: <202405151322.44FDM0hf093797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6adfee18effb - stable/14 - sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6adfee18effba91ff56341549a4e28473738316a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6adfee18effba91ff56341549a4e28473738316a commit 6adfee18effba91ff56341549a4e28473738316a Author: Konstantin Belousov AuthorDate: 2024-04-24 18:55:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-15 13:21:34 +0000 sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c (cherry picked from commit 66df81021e5437e86ff5e0886c35170feb1cd3a0) --- sys/kern/vfs_lookup.c | 5 +++++ sys/sys/namei.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 600af6d486eb..f7fb986d4472 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -88,6 +88,11 @@ static void NDVALIDATE_impl(struct nameidata *, int); ndp->ni_cnd.cn_flags |= ISRESTARTED; \ } while (0) +#define NI_CAP_VIOLATION(ndp, path) do { \ + ktrcapfail(CAPFAIL_NAMEI, (path)); \ + (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ +} while (0) + SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE4(vfs, namei, lookup, entry, "struct vnode *", "char *", "unsigned long", "bool"); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index d464423c025c..f6279700e735 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -205,11 +205,6 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NI_LCF_CAP_DOTDOT_KTR 0x0008 /* ".." in strictrelative case */ #define NI_LCF_KTR_FLAGS (NI_LCF_STRICTREL_KTR | NI_LCF_CAP_DOTDOT_KTR) -#define NI_CAP_VIOLATION(ndp, path) do { \ - ktrcapfail(CAPFAIL_NAMEI, (path)); \ - (ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \ -} while (0) - /* * Initialization of a nameidata structure. */