From: Hannes Reinecke <hare@suse.de>
To: Chris Leech <cleech@redhat.com>
Cc: linux-nvme@lists.infradead.org, Daniel Wagner <dwagner@suse.de>,
Prashanth Nayak <prashanth.nayak@netapp.com>,
John Meneghini <jmeneghi@redhat.com>
Subject: Re: [PATCH 0/1] NVMe/TLS connection issues to SPDK
Date: Tue, 22 Jul 2025 08:27:21 +0200 [thread overview]
Message-ID: <c523f9c3-06fb-4aa6-958f-e49e7c5477e4@suse.de> (raw)
In-Reply-To: <aH5gYzXAIGdsCBsn@cleech-thinkpadt14sgen2i.rmtusor.csb>
On 7/21/25 17:44, Chris Leech wrote:
> On Mon, Jul 21, 2025 at 09:11:22AM +0200, Hannes Reinecke wrote:
>> On 7/21/25 04:17, Chris Leech wrote:
>>> ...
>>> The NVMe/TCP host driver then quickly fails when SPDK sends a TLS "New
>>> Session Ticket" message before ICResp.
>>>
>>> While possibly pointless due to the transport specification prohibition
>>> on session resumption and 0-RTT data, I don't think this is necessarily
>>> wrong and the host driver should be able to safely ignore it and
>>> continue.
>>>
>> Sigh. The neverending discussion.
>> Originally I didn't implement key update for NVMe as neither gnutls nor
>> the kernel supported it.
>> Turns out that key update was implemented last year for ktls, and gnutls
>> has support functions (gnutls_session_key_update()) for this, too.
>> So we _could_ start looking into it if nvme wouldn't be using the
>> ->read_sock() interface.
>> This interface just works on skbs, and as such we can't easily get hold
>> on the TLS alert data required for figuring out if a New Session Ticket
>> message had been sent.
>
> I think this is a bit different, as it's NewSessionTicket and not
> KeyUpdate. NewSessionTicket seems to provide an age-limited PSK for
> session resumption, allowing additional connections or re-connections to
> bypass an expensive certificate handshake. We're only using retained
> PSKs and prohibited from session resumption, so while spdk probably
> shouldn't be sending NewSessionTicket it should also safe for the host
> to just filter it out of the data stream and never use it.
>
Ah, the NewSessionTicket thingie. Yes, that's completely pointless for
NVMe, as we _never_ re-use tickets for session re-establishment.
We only ever have one session, so the use-case of several short-lived
sessions doesn't apply here.
But with the current ->read_sock based receive workflow we
cannot filter out TLS NewSession messages from the NVMe layer
as we don't have access to the TCP stream itself.
So either we switch to a recvmsg() based workflow or we
need to modify the read_sock() implementation in net/tls
to filter out the NewSession message there.
Personally I'd rather switch over to recvmsg() as I never
liked the read_sock() interface anyway.
But that's my personal opinion; others may have different ideas.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2025-07-22 6:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 2:17 [PATCH 0/1] NVMe/TLS connection issues to SPDK Chris Leech
2025-07-21 2:17 ` [PATCH 1/1] libnvme: TLS PSK derivation fixes Chris Leech
2025-07-21 6:36 ` Hannes Reinecke
2025-07-21 15:31 ` Chris Leech
2025-07-25 9:36 ` Hannes Reinecke
2025-07-25 18:08 ` Chris Leech
2025-07-28 7:12 ` Hannes Reinecke
2025-08-08 16:18 ` John Meneghini
2025-08-12 4:33 ` Chris Leech
2025-08-18 9:42 ` Hannes Reinecke
2025-08-20 8:10 ` Daniel Wagner
2025-08-20 8:22 ` Hannes Reinecke
2025-08-26 14:09 ` John Meneghini
2025-07-21 7:11 ` [PATCH 0/1] NVMe/TLS connection issues to SPDK Hannes Reinecke
2025-07-21 15:44 ` Chris Leech
2025-07-22 6:27 ` Hannes Reinecke [this message]
2025-07-24 14:35 ` Daniel Wagner
2025-07-24 15:07 ` Chris Leech
2025-07-24 15:37 ` Daniel Wagner
2025-08-12 22:05 ` Chris Leech
2025-08-12 22:11 ` [RFC PATCH 1/2] crypto: hkdf: add hkdf_expand_label() Chris Leech
2025-08-18 9:44 ` Hannes Reinecke
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=c523f9c3-06fb-4aa6-958f-e49e7c5477e4@suse.de \
--to=hare@suse.de \
--cc=cleech@redhat.com \
--cc=dwagner@suse.de \
--cc=jmeneghi@redhat.com \
--cc=linux-nvme@lists.infradead.org \
--cc=prashanth.nayak@netapp.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 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.