All of lore.kernel.org
 help / color / mirror / Atom feed
* XFS and SE Linux
@ 2004-03-09 13:14 Russell Coker
  2004-03-09 14:00 ` Stephen Smalley
  2004-03-10  1:34 ` Nathan Scott
  0 siblings, 2 replies; 4+ messages in thread
From: Russell Coker @ 2004-03-09 13:14 UTC (permalink / raw)
  To: SE Linux

XFS defaults to an Inode size of 256 bytes and a block size of 4K on i386.

The "security.selinux" xattr name and the data stored in it can apparently be 
counted on to not fit into the <50 bytes left in a 256 byte Inode after all 
the other meta-data is stored.  This will mean that a new block is used for 
the XATTR (which in 99.99% of all cases will be the only XATTR on the file).

Using an extra 4K block per file is a significant waste of disk space, XFS 
apparently does not support block sharing so you have 4K of disk space for 50 
bytes of data.

If at mkfs time you make the Inode 512 bytes in size you will have enough 
space for the SE Linux xattr.  This will save huge amounts of space on a SE 
Linux system as there will effectively be 256 bytes of overhead per file 
instead of 4096.

Currently in SE Linux the contexts for files are of the form 
"system_u:object_r:file_t", why not express them on disk as 
"system_u:file_t"?  Saving 9 bytes in this manner could make some of them fit 
into a 256 byte Inode in XFS which would be a significant advantage.  Also 
for Ext2/Ext3 it will save some space as well.

I wonder what Hans Reiser will make of this, I wouldn't be surprised if he 
comes up with some stem compression scheme for XATTR's that makes all the SE 
Linux xattr's take up significantly less than half the space they do on 
Ext2/3 and packs them in with tails.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-10 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-09 13:14 XFS and SE Linux Russell Coker
2004-03-09 14:00 ` Stephen Smalley
2004-03-09 14:04   ` Russell Coker
2004-03-10  1:34 ` Nathan Scott

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.