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] [day] [month] [year] [list]
Date:	Fri, 06 Nov 2015 10:05:16 +0000
From:	David Howells <dhowells@...hat.com>
To:	linux-ext4@...r.kernel.org
Cc:	dhowells@...hat.com
Subject: Re: Is EXT4_FITS_IN_INODE() broken?

David Howells <dhowells@...hat.com> wrote:

> Is EXT4_FITS_IN_INODE() broken?  It makes use of i_extra_isize - which is an
> optional field and doesn't exist if the filesystem was made with "-I 128".
> 
> 	(gdb) p &((struct ext4_inode *)0)->i_extra_isize
> 	$2 = (__le16 *) 0x80 <irq_stack_union+128>
> 
> Should EXT4_FITS_IN_INODE():
> 
> 	#define EXT4_FITS_IN_INODE(ext4_inode, einode, field)	\
> 		((offsetof(typeof(*ext4_inode), field) +	\
> 		  sizeof((ext4_inode)->field))			\
> 		<= (EXT4_GOOD_OLD_INODE_SIZE +			\
> 		    (einode)->i_extra_isize))			\
> 
> be using EXT4_INODE_SIZE() and consulting the superblock instead?

Actually, it's not a problem - it's using i_extra_isize from the einode, not
the raw inode.

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