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: <209AEA97-E284-4ADB-8774-50C2630606B9@dilger.ca>
Date:	Thu, 12 Aug 2010 15:32:27 -0600
From:	Andreas Dilger <adilger@...ger.ca>
To:	Joel Becker <Joel.Becker@...cle.com>
Cc:	"Ted Ts'o" <tytso@....edu>, Jan Kara <jack@...e.cz>,
	ocfs2-devel@....oracle.com, linux-fsdevel@...r.kernel.org,
	linux-ext4@...r.kernel.org,
	"linux-kernel@...r.kernel.org Patrick J. LoPresti" 
	<lopresti@...il.com>
Subject: Re: [Ocfs2-devel] [PATCH 1/3] ext3/ext4: Factor out disk addressability check

On 2010-08-12, at 14:15, Joel Becker wrote:

> On Thu, Aug 12, 2010 at 12:45:41PM -0600, Andreas Dilger wrote:
>> On 2010-08-12, at 11:42, Joel Becker wrote:
>>>> +int generic_check_addressable(unsigned blocksize_bits, u64 num_blocks)
>>>> +{
>>>> +	u64 last_fs_block = num_blocks - 1;
>>>> +
>>>> +	BUG_ON(blocksize_bits < 9);
>>>> +	BUG_ON(blocksize_bits > PAGE_CACHE_SHIFT);
>> 
>> I'd rather not have a BUG_ON() for a "check" function that may be called with on-disk values by some filesystem.  Some filesystems (AFAIR) also handle blocksize > PAGE_SIZE internally, so this helper would not be useful for them.
> 
> 	Filesystems that handle their own page cache certainly wouldn't
> be interested in a generic helper anyway.  All of our pagecache assumes
> blocks between 512<->PAGE_CACHE_SIZE.
> 	If I change the BUG_ON()s to -EINVAL, does that work?  Or do you
> have some way you'd like to allow non-pagecache filesystems to use this
> as well?

That's probably fine for now.  If anyone complains, we can always change it later, since they can't possibly depend on this function yet...

Cheers, Andreas





--
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