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:	Thu, 31 May 2012 13:17:26 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"J. Bruce Fields" <bfields@...ldses.org>
Cc:	linux-nfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: nfsd changes for 3.5

On Thu, May 31, 2012 at 1:01 PM, J. Bruce Fields <bfields@...ldses.org> wrote:
>
> Right.  By default it's 90 seconds before we'll give up on the client.

So a slightly buggy client can basically DoS the server by getting a
delegation and then crashing or something. Everybody else that tries
to read that directory (not that file) will be dead in the water.
Definitely not good.

> I hate that too, and originally tried to avoid it with something like:
>
>        retry:
>                acquire locks
>                lookup inode
>                ret = try_to_break_deleg(inode);
>                if (ret)
>                        drop locks
>                        really_break_deleg(inode);
>                        goto retry;
>                ... do the real work ...
>                drop locks
>
> I felt like I was making already complicated code logic like rename's
> even harder to follow.

I do think it's the only thing we can reasonably do. I'd love to have
some kind of per-dentry lock for unlink/rename, but we don't.
Long-term, we really do need to do something about the directory
locking, though, because it's also a huge problem for readdir()
concurrency. Or at least it used to be (samba in particular). Making
it an rwsem might help readdir a tiny amount, but I suspect people
actually depend on the mutex in readdir right now.

> And those operations don't really know the inode till they acquire the
> locks, so in pathological cases that could continue forever.

I suspect at some point you just have to say "screw it".

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