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: <583681d2-2d1f-417c-b58c-ceb5407bdff5@oracle.com>
Date: Mon, 23 Sep 2024 08:27:51 +0100
From: John Garry <john.g.garry@...cle.com>
To: Johannes Thumshirn <Johannes.Thumshirn@....com>,
        "axboe@...nel.dk" <axboe@...nel.dk>, hch <hch@....de>
Cc: "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-raid@...r.kernel.org" <linux-raid@...r.kernel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
Subject: Re: [PATCH RFC 1/6] block: Rework bio_split() return value

On 19/09/2024 16:50, Johannes Thumshirn wrote:
> On 19.09.24 11:25, John Garry wrote:
>> -	BUG_ON(sectors <= 0);
>> -	BUG_ON(sectors >= bio_sectors(bio));
>> +	if (WARN_ON(sectors <= 0))
>> +		return ERR_PTR(-EINVAL);
>> +	if (WARN_ON(sectors >= bio_sectors(bio)))
>> +		return ERR_PTR(-EINVAL);
> 
> Nit: WARN_ON_ONCE() otherwise it'll trigger endless amounts of
> stacktraces in dmesg.

Considering it is a BUG_ON() today, I don't expect this to be hit. And, 
even if it was, prob it would be some buggy corner case which 
occasionally occurs.

Anyway, I don't feel too strongly about this and I suppose a 
WARN_ON_ONCE() is ok.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ