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: <ed23l2ustamwrhseseuilvunwnenpuaaeduvcmfpk4up2nstpq@rtvf7emq3erl>
Date:   Mon, 30 Oct 2023 16:07:21 +0100
From:   Daniel Wagner <dwagner@...e.de>
To:     Niklas Cassel <Niklas.Cassel@....com>
Cc:     Keith Busch <kbusch@...nel.org>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        Kenji Tomonaga <tkenbo@...il.com>
Subject: Re: [PATCH v2] nvme: update firmware version after commit

On Fri, Oct 13, 2023 at 08:37:32PM +0000, Niklas Cassel wrote:
> On Fri, Oct 13, 2023 at 10:43:48AM -0600, Keith Busch wrote:
> > On Fri, Oct 13, 2023 at 06:34:20PM +0200, Daniel Wagner wrote:
> > >  	if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, NVME_CSI_NVM,
> > > -			log, sizeof(*log), 0))
> > > +			 log, sizeof(*log), 0)) {
> > >  		dev_warn(ctrl->device, "Get FW SLOT INFO log error\n");
> > > +		goto out_free_log;
> > > +	}
> > > +
> > > +	afi = le64_to_cpu(log->afi);
> 
> BTW, this field is a single byte, so there should be no need to
> use *_to_cpu() on this. (Byte order is only important when the
> field is more than one byte.)

Indeed, I somehow thought afi is of type __le64.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ