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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Dec 2009 16:57:14 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Trond Myklebust <trond.myklebust@....uio.no>, f@...il.fritz.box
Cc:	Andi Kleen <andi@...stfloor.org>,
	Al Viro <viro@...IV.linux.org.uk>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org
Subject: Re: NFS lockdep lock misordering mmap_sem<->i_mutex_key with
	2.6.32-git1

On Wed, Dec 16, 2009 at 08:09:51AM -0500, Trond Myklebust wrote:
> On Wed, 2009-12-16 at 01:53 +0100, Andi Kleen wrote: 
> > > If you want to work around the problem rather than going for something
> > 
> > I am mostly interested in making the ugly warning on my systems
> > go away, preferably without breaking anything in the process.
> > Whatever works.
> > 
> > > like Peter's split up of the mmap() callback, then I'd suggest changing
> > > to using nfs_revalidate_mapping_nolock() instead. The fact that we are
> > > seeing these lock misordering warnings is proof that the call to
> > > nfs_revalidate_mapping() is not always a no-op.
> > 
> > I would say the interesting question is if there is really a expectation
> > that mmap does this kind of synchronization? 
> 
> Usually people who set the 'noac' mount flag will expect these syscalls
> to act as synchronisation points.

It would be definitely a synchronization point if they deadlock in 
mmap due to a ABBA race.

> Typically, their applications will be using some kind of locking scheme
> that does not require POSIX or BSD locks to be set. For instance, they
> may synchronise by means of a token passed through a socket (common in
> MPI iirc).

Still mmap seems like an odd synchronization point. Is not doing it 
in it really likely to break anything?

> > Why in mmap, not somewhere else?
> 
> We do the same thing in the read() and write() syscalls.

Ok I didn't fully understand your suggestion to use the _nolock
variant. Are you saying i_mutex is sometimes not needed?

I thought _nolock was only for the case i_mutex is already hold --
which is not the case here.

-Andi
-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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