From nobody Wed Apr 24 19:43:43 2024 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 4VPqDH2pM7z5HyqP; Wed, 24 Apr 2024 19:43:43 +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 4VPqDH25Phz4FPp; Wed, 24 Apr 2024 19:43:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713987823; 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=tmguB/Jj25pXaUbYV2Yb0stpf2PunLCHLZBzgNeN9EI=; b=xKYW8VFe3Qkgad9jujl4QPVRKUSDUhgWZbYAyhUahlGhskoCKqbAW/yPgnigIL1pLpwsyp 7ez2aBGOOnJLeRUIZ0xZ8Cm6Ad6WFZCoxHyRreNRBL+mo7eSW0ZowIZ1C0aKnLo0yCIks7 iwY9XJihCKqi4Vb0aKZeyOQLI8Z3YvWof777TCJ3NTrtbqKgTdGu6GoSshY1mcWi3rKfut uc0yeiFXbvrE8SeGt/fHjPflPk2N2OgYuaMG9CblV+sw9GRgHHtX63eb6rTq8BR0lHimJZ pZ0A7zASMWGGicyTpYSS4gE5V95Zjo+LwHTUNaMWEG2bey3uBPJtNRJ1GJLoxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713987823; a=rsa-sha256; cv=none; b=AfwPzq7zub63zy4btq2+shbWKEMMHu9S+GlSShZ5HPf/xirUt7ygc6CWJjkmokAy547cci SomewQRIOtZS687R9lehoKErmbgBZiYeYuPtGMXeL4SPfS9LzaT6oTL9QzHYxnLBnZLjAw DYoCk/FW8Vullggh0/9SaCugQSjNAY86/nAo1If1+6Up3u+6AnB8X6pQMuDvra7KCWJne9 mfU7tag3M15/F2tNoYDNrik78HYkVbypMGPnJT+I82wPnLf72uHKqb/WrDGo7ehHZzdSCZ hpd1QdNWuHkYqYfsWb6AAOvLerNXv/bFh/5WrKoVPHNfdgKo0fqxNxefUXBWXw== 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=1713987823; 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=tmguB/Jj25pXaUbYV2Yb0stpf2PunLCHLZBzgNeN9EI=; b=QJuoufyKPztGSUoljh1MDmdzAZha5/17x5otxc0I4OQFzyCySkb9udrt8ZNem8+iwhTGsz 7jgQ0TsMj/8jKU7A9zwRL3NUSqZms80FCtRCwrJZi9lp+MUjt5gti2icjlWc3QDzZWcw8W 38quOfmNlyj4PSo8GMRODjYec4LP4+srMqYcOW3oJTXWrarFXWTHzsB21G8PVgKmZZcd9T TJNIJInkvMS8VHmEuTFj23CXda8lYV9jVbw5Pjt057k611v0AVusaBX6Kd6tOsY/cuzaHJ lHAJqbnNZBL9fHCcdRyP/BY27yyjdQtsb5zwlEHUpLpDgyIsCXSqNLzUmdVthg== 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 4VPqDH1bs1zSyj; Wed, 24 Apr 2024 19:43:43 +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 43OJhhOJ013940; Wed, 24 Apr 2024 19:43:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43OJhhig013937; Wed, 24 Apr 2024 19:43:43 GMT (envelope-from git) Date: Wed, 24 Apr 2024 19:43:43 GMT Message-Id: <202404241943.43OJhhig013937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 66df81021e54 - main - sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 66df81021e5437e86ff5e0886c35170feb1cd3a0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=66df81021e5437e86ff5e0886c35170feb1cd3a0 commit 66df81021e5437e86ff5e0886c35170feb1cd3a0 Author: Konstantin Belousov AuthorDate: 2024-04-24 18:55:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-04-24 19:43:31 +0000 sys/namei.h: move NI_CAP_VIOLATION() macro from namei.h to vfs_lookup.c Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931 --- 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 7d708bac607e..180605f9eb8a 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -86,6 +86,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 08395c6d699f..2ea4f502e8fd 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. */