lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKmqyKNr8N4r=9RvgErr-zj929gd8oRfdKGgrhVajK_UxR828g@mail.gmail.com>
Date: Mon, 3 Nov 2025 11:47:23 +1000
From: Alistair Francis <alistair23@...il.com>
To: Christoph Hellwig <hch@....de>
Cc: kbusch@...nel.org, axboe@...nel.dk, sagi@...mberg.me, hare@...e.de, 
	kch@...dia.com, linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH 3/3] nvme: Allow reauth from sysfs

On Sat, Nov 1, 2025 at 12:05 AM Christoph Hellwig <hch@....de> wrote:
>
> On Thu, Oct 30, 2025 at 01:51:14PM +1000, alistair23@...il.com wrote:
> > From: Alistair Francis <alistair.francis@....com>
> >
> > Allow userspace to trigger a reauth (REPLACETLSPSK) from sysfs.
> > This can be done by writing the queue ID to te sysfs file.
> >
> > echo 0 > /sys/devices/virtual/nvme-fabrics/ctl/nvme0/replace_psk
> >
> > Note that only QID 0 (admin queue) is supported.
>
> Why pass the queue ID then instead of a boolean value?

I liked the explicitness of passing a queue ID instead of a bool and
it allows supporting more queues in the future if that changes in the
spec.

I can change it to a bool instead if that's preferred?

Alistair

>
> > +static ssize_t nvme_sysfs_replace_psk(struct device *dev,
> > +                                   struct device_attribute *attr, const char *buf,
> > +                                   size_t count)
>
> Overly long line.  And very inefficient annoyoing to modify indentation
> compared to:
>
> static ssize_t nvme_sysfs_replace_psk(struct device *dev,
>                 struct device_attribute *attr, const char *buf, size_t count)
>
> > +     rc = kstrtoint(buf, 10, &qid);
> > +     if (rc)
> > +             return rc;
>
> Nitpick, but nvme style is to use the slightly more descriptive
> error and not "rc" which doesn't mean much in general.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ