Netdev List
 help / color / mirror / Atom feed
From: "Chuck Lever" <cel@kernel.org>
To: "Jakub Kicinski" <kuba@kernel.org>
Cc: "Donald Hunter" <donald.hunter@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Sabrina Dubroca" <sd@queasysnail.net>,
	"Keith Busch" <kbusch@kernel.org>, "Jens Axboe" <axboe@kernel.dk>,
	"Christoph Hellwig" <hch@lst.de>,
	"Sagi Grimberg" <sagi@grimberg.me>,
	"Chaitanya Kulkarni" <kch@nvidia.com>,
	"Jeff Layton" <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
	"Olga Kornievskaia" <okorniev@redhat.com>,
	"Dai Ngo" <Dai.Ngo@oracle.com>, "Tom Talpey" <tom@talpey.com>,
	"Eric Dumazet" <edumazet@kernel.org>,
	kernel-tls-handshake@lists.linux.dev, netdev@vger.kernel.org,
	linux-nvme@lists.infradead.org, linux-nfs@vger.kernel.org,
	"Hannes Reinecke" <hare@kernel.org>
Subject: Re: [PATCH net-next v3 00/10] Deliver TLS session tags to upper-layer consumers (NFSD)
Date: Tue, 24 Nov 2026 10:27:45 -0500	[thread overview]
Message-ID: <fbcfb7b2-4cd9-47c9-9cd9-1186a5b15059@app.fastmail.com> (raw)
In-Reply-To: <20261123155242.49d87894@kernel.org>


On Mon, Nov 23, 2026, at 7:34 PM, Jakub Kicinski wrote:
> On Sun, 22 Nov 2026 16:27:08 -0800 Chuck Lever wrote:
>> On Sat, Nov 21, 2026, at 4:13 PM, Jakub Kicinski wrote:
>> > Naively I'd think it creates unnecessarily wide API on both ends
>> > (handshake and server). My knee jerk design would be to populate
>> > the full policy in the server, and only carry some "policy ID"
>> > thru the handshake. Number of policy IDs would equal to the number
>> > of tag combinations (which result in different behavior).  
>> 
>> How is a tag much different than a policy ID?
>> 
>> It wouldn’t be impossible to impose another layer here that makes
>> a specific set of tags into a single policy, but I’m not seeing
>> that doing such adds a lot of value.
>
> My thinking was that we have two user space components (TLS handshake
> handler and the storage server stack) which are required to render
> their decision in the language of tags, and upload the result
> to the kernel via independent APIs. The policy ID limits the kernel
> to mechanical enforcement.

That is basically the structure I have planned.

- tlshd parses the x.509 certificate and assigns matching tags to
  TLS sessions

- The exportfs command assigns tags to NFS exports and passes the
  tags to the kernel as part of its usual downcall

- Kernel NFSD grants access to an NFS export only when there is a
  non-empty intersection between the tags on the TLS session and
  the tags on the export being accessed.

This might be more helpful than the scant series cover letter:

  https://github.com/linux-nfs/ktls-utils/blob/main/man/man7/tls-session-tags.7

It describes the configuration of tlshd's tagging policies. The man
page actually describes how these things are stored in YAML; to
make it easier for humans, we could build a bespoke editing tool. 

The exportfs command will get an "allow-tags=" option that specifies
the set of tags that are granted access. I have some prototype
patches in a private tree, so nothing publishable here yet.


> The components resolve all decisions in user
> space, and give the kernel full list of policy ID -> allowed resources.

Yes, exactly so.


> Could be purely a subjective preference, I won't insist.

I will do another survey of policy mechanisms, as you suggested, at
least for reviewer reference.


> Tho an ack
> from someone experienced with building kernel (security?) policies
> would be awesome.

Agreed, review welcome. I'm open to suggestion on modifying the Cc:
list.


> BTW someone marked the patches as changes requested, so repost will be
> needed.

Yes, I plan a re-roll to address the sashiko review findings you
referred me to.


-- 
Chuck Lever

  reply	other threads:[~2026-11-24 15:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 19:21 [PATCH net-next v3 00/10] Deliver TLS session tags to upper-layer consumers (NFSD) Chuck Lever
2026-11-13 19:21 ` [PATCH net-next v3 01/10] handshake: Add tags to "done" downcall Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 02/10] lib: Add a "stringset" data structure Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 03/10] lib: Add KUnit tests for the stringset " Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 04/10] handshake: Add a session-tags argument to the TLS done callback Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 05/10] handshake: Pick up session tags passed during the DONE downcall Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 06/10] handshake: Add a kunit test for the completion gate Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 07/10] handshake: Advertise the session-tag cap to user space Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 08/10] SUNRPC: Copy the TLS session tags when they are available Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 09/10] NFSD: Implement export tagging Chuck Lever
2026-11-13 19:22 ` [PATCH net-next v3 10/10] NFSD: Add allow_tags to the netlink export interface Chuck Lever
2026-11-19 16:35 ` [PATCH net-next v3 00/10] Deliver TLS session tags to upper-layer consumers (NFSD) Simon Horman
2026-11-22  0:13 ` Jakub Kicinski
2026-11-23  0:27   ` Chuck Lever
2026-11-24  0:34     ` Jakub Kicinski
2026-11-24 15:27       ` Chuck Lever [this message]
2026-11-23  0:59   ` Chuck Lever

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=fbcfb7b2-4cd9-47c9-9cd9-1186a5b15059@app.fastmail.com \
    --to=cel@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=hare@kernel.org \
    --cc=hch@lst.de \
    --cc=horms@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=neil@brown.name \
    --cc=netdev@vger.kernel.org \
    --cc=okorniev@redhat.com \
    --cc=pabeni@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=sd@queasysnail.net \
    --cc=tom@talpey.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox