From: Keith Busch <kbusch@kernel.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Guixin Liu <kanie@linux.alibaba.com>,
Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
Nilay Shroff <nilay@linux.ibm.com>,
Daniel Wagner <dwagner@suse.de>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3 2/2] nvme-auth: fix data race on ctrl->transaction
Date: Wed, 18 Nov 2026 19:49:50 -0700 [thread overview]
Message-ID: <av5jzr_dZROU4lH3@kbusch-mbp> (raw)
In-Reply-To: <0366b9fc-50b4-4739-9564-53c8783bdb0c@suse.de>
On Tue, Nov 17, 2026 at 08:23:38AM +0100, Hannes Reinecke wrote:
> On 11/16/26 4:37 PM, Keith Busch wrote:
>
> It's somewhat ambiguous.
> Spec says 'carrying the same transaction identifier value for the entire
> authentication transaction' (for AUTH_negotiate), and later on 'carrying
> the same transaction identifier' (for any other AUTH message).
> So actually we just have to make sure they are identical.
> (The random number is '4' ...)
>
> But the overall idea here is to distinguish transactions, so the implication
> is that each transaction should carry different identifiers.
> And my issue here is precisely 'each transaction'. Surely within each
> queue, but I'd really would want to distinguish _across_ queues, too.
> (And possibly with a random starting value to boot).
> Just to avoid any fuzzers trying to be clever with guessing the
> authentication ID (or bugs setting the transaction ID to 0 for every
> queue ... same reason why we introduced the 'genctr' for the command
> ID).
>
> But if you don't feel that's an issue, fine, I'll be shutting up.
I'd normally defer to you on this feature since you've more hands-on
experience here. I just think the qid:t_id pair already distinguishes
transactions on the wire; each queue is its own connection after all.
Regarding genctr, I thought that was because some intermediary switch
was replaying packets, but the commit message doesn't appear to support
that recollection. Regardless, the value is per-request, so it's on an
even more finer granularity than per-queue.
next prev parent reply other threads:[~2026-11-19 2:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 8:12 [PATCH v3 0/2] nvme: fabrics and target fixes Guixin Liu
2026-11-16 8:12 ` [PATCH v3 1/2] nvme-fc: fix use-after-free in nvme_fc_match_disconn_ls() Guixin Liu
2026-11-20 17:39 ` Christoph Hellwig
2026-11-16 8:12 ` [PATCH v3 2/2] nvme-auth: fix data race on ctrl->transaction Guixin Liu
2026-11-16 13:22 ` Hannes Reinecke
2026-11-16 15:37 ` Keith Busch
2026-11-17 7:23 ` Hannes Reinecke
2026-11-19 2:49 ` Keith Busch [this message]
2026-11-17 2:16 ` Guixin Liu
2026-11-17 7:31 ` Hannes Reinecke
2026-11-20 19:54 ` (subset) [PATCH v3 0/2] nvme: fabrics and target fixes Keith Busch
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=av5jzr_dZROU4lH3@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kanie@linux.alibaba.com \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
/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