Changing back to per-thread credentials on Linux (fixing native AIO).
Volker.Lendecke at SerNet.DE
Mon Jul 2 07:20:58 MDT 2012
On Mon, Jul 02, 2012 at 09:10:39AM -0400, simo wrote:
> On Mon, 2012-07-02 at 14:36 +0200, Volker Lendecke wrote:
> > On Mon, Jul 02, 2012 at 08:13:38AM -0400, Jeff Layton wrote:
> > > It took me a minute to parse what Volker was saying but I think I get
> > > it now. Volker, correct me if I'm wrong...
> > >
> > > It used to be that the direct syscall scheme would just return an int
> > > (or whatever you liked). Now, the syscall() wrapper generally returns
> > > '-1' on error and sets errno. Since errno isn't thread-local, multiple
> > > threads could clobber each others' error codes.
> > >
> > > In light of that, I'm inclined to believe that Volker is correct here
> > > and you'll be best off with some sort of blessing from the glibc folks
> > > on this. A simple, thread-local syscall() function would probably be
> > > quite handy, but that's a rather long rope for hanging onesself. ;)
> Jeff, we are not using clone() here, so we should have no problem with
> errno as it should already be using thread-local storage.
> What Volker is afraif of, if I understand correctly, is that glibc
> maintainers may decide to change the semantics of syscall() again to
> block per-thread credential handling.
Exact. Either that or by accident spoil it, because it is
such a little used feature.
With best regards,
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical