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-next>] [day] [month] [year] [list]
Date:	Wed, 25 Feb 2015 14:02:13 +0300
From:	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To:	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
	Theodore Ts'o <tytso@....edu>
CC:	Li Xi <pkuelelixi@...il.com>
Subject: How to add new fields into inode?

Currently I'm working on (yet another attempt of) project id and quota
for ext4. Obviously I want to add new u32 field into inode for holding
it's project id.

As I see policy for that isn't well defined:

Kernel tries to allocate extra space according to sizeof(struct
ext4_inode). If EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE is set then it takes
maximum of sizeof, s_want_extra_isize and s_min_extra_isize.

Libext2fs always allocates space for it's own structure and in some
cases checks s_want_extra_isize but without checking related feature.

Thus in some cases default extra size of inodes doesn't depend on
present features and changes if we add new fields into structure.
For example expected output of some unit tests depends on that value.

Question is: it's ok to waste some bytes for unused fields at the of
inode or default extra size should depend on actually enabled features?

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