[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190727194627.ivyc4rltkfgvdhpf@brauner.io>
Date: Sat, 27 Jul 2019 21:46:27 +0200
From: Christian Brauner <christian@...uner.io>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
Oleg Nesterov <oleg@...hat.com>, Arnd Bergmann <arnd@...db.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Kees Cook <keescook@...omium.org>,
Joel Fernandes <joel@...lfernandes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tejun Heo <tj@...nel.org>, David Howells <dhowells@...hat.com>,
Jann Horn <jannh@...gle.com>,
Andrew Lutomirski <luto@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Aleksa Sarai <cyphar@...har.com>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v2 1/2] pidfd: add P_PIDFD to waitid()
On Sat, Jul 27, 2019 at 05:49:32PM +0100, Al Viro wrote:
> On Sat, Jul 27, 2019 at 09:28:40AM -0700, Linus Torvalds wrote:
>
> > is the stupid and straightforward thing, but if you want to be
> > *clever* you can actually avoid getting a reference to the 'struct
> > file *" entirely, and do the fd->pid lookup under rcu_read_lock()
> > instead. It's slightly more complex, but it avoids the fdget/fdput
> > reference count games entirely.
>
> Yecchhh... Please, don't do the last part - at least not unless
> we really see that in profiles.
Yeah, I will leave this out for now.
Christian
Powered by blists - more mailing lists