From: sashiko-bot@kernel.org
To: "Chuck Lever" <cel@kernel.org>
Cc: linux-nvme@lists.infradead.org,
"Jeff Layton" <jlayton@kernel.org>,
"Anna Schumaker" <anna@kernel.org>
Subject: Re: [PATCH net-next v2 10/10] NFSD: Add allow_tags to the netlink export interface
Date: Fri, 13 Nov 2026 14:52:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-213027@kernel.org> (raw)
In-Reply-To: <20261112-tls-session-tags-v2-10-a587a50de7fc@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] nfsd: NLA_STRING policy in fs/nfsd/netlink.c disagrees with
nfsd.yaml
--
commit 1059c4281c80865b99ac7732d9133036256073b9
Author: Chuck Lever <cel@kernel.org>
NFSD: Add allow_tags to the netlink export interface
This commit adds the allow-tags attribute to the NFSD netlink svc-export
attribute set and parses it in nfsd_nl_parse_one_export() to enforce mTLS
session tag policies.
> diff --git a/Documentation/netlink/specs/nfsd.yaml b/Documentation/netlink/specs/nfsd.yaml
> index 9ae37bf3ea717..e58856b34b020 100644
> --- a/Documentation/netlink/specs/nfsd.yaml
> +++ b/Documentation/netlink/specs/nfsd.yaml
[ ... ]
> @@ -297,6 +301,12 @@ attribute-sets:
> -
> name: fsid
> type: s32
> + -
> + name: allow-tags
> + type: string
> + checks:
> + max-len: handshake-session-tag-max-len
> + multi-attr: true
> -
> name: svc-export-reqs
> attributes:
[ ... ]
> diff --git a/fs/nfsd/netlink.c b/fs/nfsd/netlink.c
> index 88a4a4ffcb7fd..146c655757410 100644
> --- a/fs/nfsd/netlink.c
> +++ b/fs/nfsd/netlink.c
[ ... ]
> @@ -41,7 +42,7 @@ const struct nla_policy nfsd_sock_nl_policy[NFSD_A_SOCK_TRANSPORT_NAME + 1] = {
> [NFSD_A_SOCK_TRANSPORT_NAME] = { .type = NLA_NUL_STRING, },
> };
>
> -const struct nla_policy nfsd_svc_export_nl_policy[NFSD_A_SVC_EXPORT_FSID + 1] = {
> +const struct nla_policy nfsd_svc_export_nl_policy[NFSD_A_SVC_EXPORT_ALLOW_TAGS + 1] = {
> [NFSD_A_SVC_EXPORT_SEQNO] = { .type = NLA_U64, },
> [NFSD_A_SVC_EXPORT_CLIENT] = { .type = NLA_NUL_STRING, },
> [NFSD_A_SVC_EXPORT_PATH] = { .type = NLA_NUL_STRING, },
> @@ -55,6 +56,7 @@ const struct nla_policy nfsd_svc_export_nl_policy[NFSD_A_SVC_EXPORT_FSID + 1] =
> [NFSD_A_SVC_EXPORT_XPRTSEC] = NLA_POLICY_MASK(NLA_U32, 0x7),
> [NFSD_A_SVC_EXPORT_FLAGS] = NLA_POLICY_MASK(NLA_U32, 0x3ffff),
> [NFSD_A_SVC_EXPORT_FSID] = { .type = NLA_S32, },
> + [NFSD_A_SVC_EXPORT_ALLOW_TAGS] = { .type = NLA_STRING, .len = HANDSHAKE_SESSION_TAG_MAX_LEN, },
> };
[Severity: Medium]
Was fs/nfsd/netlink.c edited by hand to use NLA_STRING for
NFSD_A_SVC_EXPORT_ALLOW_TAGS?
fs/nfsd/netlink.c is generated from Documentation/netlink/specs/nfsd.yaml,
where allow-tags is a genetlink string attribute without unterminated-ok.
Running tools/net/ynl/ynl-regen.sh will overwrite this entry with
.type = NLA_NUL_STRING, changing the kernel attribute validation policy on
the next regeneration.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-tls-session-tags-v2-0-a587a50de7fc@kernel.org?part=10
prev parent reply other threads:[~2026-11-13 14:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 14:52 [PATCH net-next v2 00/10] Deliver TLS session tags to upper-layer consumers (NFSD) Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 01/10] handshake: Add tags to "done" downcall Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 02/10] lib: Add a "stringset" data structure Chuck Lever
2026-11-13 14:52 ` sashiko-bot
2026-11-12 14:52 ` [PATCH net-next v2 03/10] lib: Add KUnit tests for the stringset " Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 04/10] handshake: Add a session-tags argument to the TLS done callback Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 05/10] handshake: Pick up session tags passed during the DONE downcall Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 06/10] handshake: Add a kunit test for the completion gate Chuck Lever
2026-11-13 14:52 ` sashiko-bot
2026-11-12 14:52 ` [PATCH net-next v2 07/10] handshake: Advertise the session-tag cap to user space Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 08/10] SUNRPC: Copy the TLS session tags when they are available Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 09/10] NFSD: Implement export tagging Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 10/10] NFSD: Add allow_tags to the netlink export interface Chuck Lever
2026-11-13 14:52 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-213027@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.