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]
Date:	Thu, 03 May 2007 10:54:34 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Kristian Høgsberg <krh@...hat.com>
CC:	Christoph Hellwig <hch@...radead.org>,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux1394-devel <linux1394-devel@...ts.sourceforge.net>
Subject: Re: [PATCH 2/6] firewire: isochronous and asynchronous I/O

Kristian Høgsberg wrote:
> Christoph Hellwig wrote:
[...]
>>> +	retval = fw_core_add_descriptor(&model_id_descriptor);
>>> +	BUG_ON(retval < 0);
>> 
>> These kinds of bug checks look wrong.  Either the operations
>> can't fail in which case they should not return an error value
>> or you should handle them properly.
> 
> The fw_core_add_descriptor() checks that the descriptor block it's passed is 
> internally consistent and is used for blocks passed in from userspace too.  In 
> these two cases, the blocks are static const arrays in the driver and if 
> fw_core_add_descriptor returns < 0 it's a bug in the driver.

When you submitted it, I too wondered whether these BUG_ONs are correct
(they are) and whether they are worth having (not so sure).

A plus of a smaller stack is that we need less assertions to guard its
integrity. :-)
-- 
Stefan Richter
-=====-=-=== -=-= ---==
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ