[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extended attributes security problem



On Sat, 6 Apr 2002, Andi Kleen wrote:

> Have you actually tested this? The EA limit is 64K per inode and there
> is an inode space limit on the XFS fs too (normally 25% of the disk space).

Are you sure about this?  I think the limit is 64k per attribute; you can
still have multiple 64k attributes.

I made a tiny xfs filesystem to test this, then made a 0-byte file and
added 64K attributes until I ran out of space:

[root@lite sda2]# pwd
/mnt/sda2
[root@lite sda2]# ls -la
total 4
drwxr-xr-x    2 root     root           16 Apr  6 18:01 .
drwxr-xr-x   11 root     root         4096 Mar 19 11:44 ..
-rw-r--r--    1 root     root            0 Apr  6 17:58 foo
[root@lite sda2]# df -h | grep sda2
/dev/sda2             1.3M  1.3M   28k  98% /mnt/sda2
[root@lite sda2]# xfs_info /mnt/sda2
meta-data=/mnt/sda2              isize=256    agcount=1, agsize=1536 blks
data     =                       bsize=4096   blocks=1536, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=0
naming   =version 2              bsize=4096
log      =internal               bsize=4096   blocks=1200
realtime =none                   extsz=65536  blocks=0, rtextents=0

so apparently the attr stored outside the inode does not count as inode
space in imaxpct.

-Eric