From: Miklos Szeredi <miklos@szeredi.hu>
To: trond.myklebust@fys.uio.no
Cc: chrisw@osdl.org, matthew@wil.cx, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: DoS with POSIX file locks?
Date: Tue, 21 Mar 2006 18:58:03 +0100 [thread overview]
Message-ID: <E1FLl7L-0002u9-00@dorka.pomaz.szeredi.hu> (raw)
In-Reply-To: <1142962083.7987.37.camel@lade.trondhjem.org> (message from Trond Myklebust on Tue, 21 Mar 2006 12:28:03 -0500)
> > Apps using LinuxThreads seem to be candidates:
> >
> > According to POSIX 1003.1c, a successful `exec*' in one of the
> > threads should automatically terminate all other threads in the
> > program. This behavior is not yet implemented in LinuxThreads.
> > Calling `pthread_kill_other_threads_np' before `exec*' achieves
> > much of the same behavior, except that if `exec*' ultimately
> > fails, then all other threads are already killed.
> >
> > steal_locks() was probably added as a workaround for this case, no?
>
> Possibly, but LinuxThreads were never really POSIX thread compliant
> anyway. Anyhow, the problem isn't really LinuxThreads, it is rather that
> the existence of the standalone CLONE_FILES flag allows you to do a lot
> of weird inheritance crap with 'posix locks' that the POSIX standards
> committees never even had to consider.
Yes. The execve-with-multiple-threads/posix-locks interaction is not
documented for LinuxThreads but removing steal_locks() makes that
implementation slighly differently incompatible to POSIX. Some
application _might_ be relying on the current behavior.
It's just a question of how much confidence do we have, that no app
will break if steal_locks() is removed. This function was added by
Chris Wright on 2003-12-29 (Cset 1.1371.111.3):
Add steal_locks helper for use in conjunction with unshare_files to
make sure POSIX file lock semantics aren't broken due to
unshare_files.
Chris, do you remember if this was due to some concrete breakage or
just a preemtive measure?
Miklos
next prev parent reply other threads:[~2006-03-21 17:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-20 11:41 DoS with POSIX file locks? Miklos Szeredi
2006-03-20 12:11 ` Matthew Wilcox
2006-03-20 12:19 ` Miklos Szeredi
2006-03-20 12:39 ` Matthew Wilcox
2006-03-20 12:52 ` Miklos Szeredi
2006-03-20 13:13 ` Arjan van de Ven
2006-03-20 13:24 ` Miklos Szeredi
2006-03-20 13:30 ` Arjan van de Ven
2006-03-20 13:39 ` Miklos Szeredi
2006-03-20 15:32 ` Matthew Wilcox
2006-03-20 16:41 ` Miklos Szeredi
2006-03-20 20:35 ` J. Bruce Fields
2006-03-21 6:38 ` Miklos Szeredi
2006-03-20 18:22 ` Trond Myklebust
2006-03-21 9:44 ` Miklos Szeredi
2006-03-21 17:28 ` Trond Myklebust
2006-03-21 17:58 ` Miklos Szeredi [this message]
2006-03-21 18:16 ` Trond Myklebust
2006-03-21 19:16 ` Chris Wright
2006-03-22 6:21 ` Miklos Szeredi
2006-03-22 11:12 ` Trond Myklebust
2006-03-22 12:16 ` Miklos Szeredi
2006-03-22 15:56 ` Trond Myklebust
2006-03-22 16:34 ` Miklos Szeredi
2006-03-22 20:07 ` Trond Myklebust
2006-03-22 20:19 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1FLl7L-0002u9-00@dorka.pomaz.szeredi.hu \
--to=miklos@szeredi.hu \
--cc=chrisw@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).