Date: Fri, 29 Mar 2002 12:41:46 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Alfred Perlstein <bright@mu.org>, John Baldwin <jhb@FreeBSD.ORG>, arch@FreeBSD.ORG Subject: Re: curthread vs. passing thread pointers around Message-ID: <Pine.BSF.4.21.0203291234080.726-100000@InterJet.elischer.org> In-Reply-To: <72088.1017431691@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Mar 2002, Poul-Henning Kamp wrote: > In message <20020329194158.GX93885@elvis.mu.org>, Alfred Perlstein writes: > >* John Baldwin <jhb@FreeBSD.org> [020329 11:32] wrote: > >> During a discussion on the smp@ list about changes to the suser() > >> API to make use of td_ucred, [...] > > On a related note: I intend to change the open/close/ioctl interface > to device drivers from a "struct thread *" to a "struct ucred That's probably ok, though I have an uneasy feeling about it.. I'd go further and say that you should not even pass that. anyone needing it can do curthread->td_ucred. Hardly any drivers use it. Since AIO doesn't include open/close I am not sure I can think of a case when the curthread is not the thread that should be charged/authorised with the open/ioctl/close. In many cases td is only used to fead to suser*() in which case it wouldn't be needed at all. I think we could make a case for CURRENT code that we need not pass anything at all, but what are we cutting out in th epossible future? > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0203291234080.726-100000>