From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hare@suse.de, hch@lst.de,
Keith Busch <kbusch@kernel.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] nvme: split host and target nvme_auth_extract_key
Date: Thu, 30 Oct 2025 07:01:55 +0100 [thread overview]
Message-ID: <20251030060155.GA12793@lst.de> (raw)
In-Reply-To: <20251029145745.3723258-1-kbusch@meta.com>
On Wed, Oct 29, 2025 at 07:57:45AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> The host and target share common code, but the config allows you to
> disable support for one and not the other. When support is disabled, a
> stub implementation needs to be used, but that would clash with the real
> implementation that the other relies on.
>
> Split the host and target implementations into uniquely named stub
> functions that either call the real implementation or return an error if
> their config option is disabled.
>
> Fixes: f59ae5c9e356b5e ("nvme: parse dhchap keys during option parsing")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202510100105.cibujuUJ-lkp@intel.com/
> Signed-off-by: Keith Busch <kbusch@kernel.org>
This seems a bit backwards. How about dropping the stub entirely
and guard the calls with IS_ENABLED or if needed ifdefs instead?
> - key = nvme_auth_extract_key(host->dhchap_keyring, secret, len, &generated);
> + key = nvme_auth_extract_key_target(host->dhchap_keyring, secret, len, &generated);
And maybe fix the (pre-existing) overly long line here if you end up
touching this.
next prev parent reply other threads:[~2025-10-30 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 14:57 [PATCH] nvme: split host and target nvme_auth_extract_key Keith Busch
2025-10-30 6:01 ` Christoph Hellwig [this message]
2025-10-30 9:45 ` 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=20251030060155.GA12793@lst.de \
--to=hch@lst.de \
--cc=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.org \
--cc=lkp@intel.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