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: <aS9MTGx6V6VacZeH@localhost.localdomain>
Date: Tue, 2 Dec 2025 23:30:04 +0300
From: Eugene Korenevsky <ekorenevsky@...yun.com>
To: Keith Busch <kbusch@...nel.org>
Cc: Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
	Sagi Grimberg <sagi@...mberg.me>, linux-nvme@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] nvme: nvme_identify_ns_descs: prevent oob

> > -	for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) {
> > -		struct nvme_ns_id_desc *cur = data + pos;

> > +	pos = 0;
> > +	do {

> > +	} while (pos < NVME_IDENTIFY_DATA_SIZE - sizeof(*cur));

> I don't want bikeshed this, but I thought this looked better as a
> for-loop. You can just modify the continuing condition instead of
> changing the loop type to do-while.

OK, tried to make the patch as close as possible to previous code.
See v4.

Also, adding 'pos += len' to modified `for` makes the line longer
than 80 symbols. However, checkpatch.pl says it is OK. Let me know
if it should be fixed somehow (e.g. by moving 'pos += len' to the
end of loop compound statement).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ