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]
Message-ID: <20090610160930.GB10240@mit.edu>
Date:	Wed, 10 Jun 2009 12:09:30 -0400
From:	Theodore Tso <tytso@....edu>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	LKML <linux-kernel@...r.kernel.org>, linux-next@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re: linux-next: next-20090609 hangs in early user mode

On Wed, Jun 10, 2009 at 04:08:39PM +0100, Al Viro wrote:
> We can, but... it's again a matter of combining things with different
> locking.  i_flags is protected by i_mutex, so if you put another
> unsigned short next to it, you'd better make sure that i_mutex
> is necessary and sufficient for modifying it.
> 
> Depending on the target, gcc may turn 16bit read-modify-store into 32bit one,
> so if you have two 16bit fields next to each other, you can run into
> 
> CPU1:                     CPU2:
> r1 = *(u32 *)p;           r2 = *(u32 *)p;
> r1 |= 1;                  r2 |= 1 << 16;
> *(u32 *)p = r1;           *(u32 *)p = r2;
> 
> with obvious results.  So we need the same locking for both such fields...

Yelch....  good point.  I'll look and see if there's some other 8 or
16-bit type to combine it with, but we may have started to hit
diminishing returns with this this approach to sliming the inode slab
caches.  I'm beginning to think if I want to make the inodes smaller,
I'm going to have to create a separate substructure for fields only
used when a file descriptor is opened on that inode, both in struct
inode and in struct ext4_inode_info.  (Lifetime management of the
substructure is going to be non-trivial, though.)

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ