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: <47ABCCC1.8070103@redhat.com>
Date:	Thu, 07 Feb 2008 21:30:09 -0600
From:	Eric Sandeen <sandeen@...hat.com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
CC:	Mingming Cao <cmm@...ibm.com>, Eric Sesterhenn <snakebyte@....de>,
	linux-ext4@...r.kernel.org,
	Dave Kleikamp <shaggy@...ux.vnet.ibm.com>
Subject: Re: BUG_ON at mballoc.c:3752

Aneesh Kumar K.V wrote:
> On Thu, Feb 07, 2008 at 05:30:48PM -0800, Mingming Cao wrote:
>> On Thu, 2008-02-07 at 18:25 +0530, Aneesh Kumar K.V wrote:
>>
>>> ext4: Don't panic in case of corrupt bitmap
>>>
>>> From: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
>>>
>>> Multiblock allocator was calling BUG_ON in many case if the free and used
>>> blocks count obtained looking at the bitmap is different from what
>>> the allocator internally accounted for. Use ext4_error in such case
>>> and don't panic the system.
>>>
>> There seems a lot of BUG_ON() and BUG() in mballoc code, other than this
>> case. Should it always panic the whole system in those cases? Perhaps
>> replacing with ext4_error() or some cases just WARN_ON is enough.
>>
> 
> I had looked at the BUG_ON in mballoc code and found them very useful
> while stabilizing the mballoc code. It helped to catch wrong usage of
> functions. Most of the BUG_ON are there to make sure we call the API
> with the lock held or the API should not return value greater than 'x'
> Should not call the function with a particular argument as NULL ...etc
> kind of thing. So i would suggest to keep them as such.

Yep - as long as the BUG_ONs are for programming errors, and not things
like memory allocation failures or corrupted disks, I think it's ok.
Not that I've audited them all.  :)

I asked about this early on, and got that answer... I'm reasonably
satisfied with it.

-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ