Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 13 Feb 2020 13:30:11 -0800
From: Linus Torvalds <>
To: Al Viro <>
Cc: "Eric W. Biederman" <>, LKML <>, 
	Kernel Hardening <>, Linux API <>, 
	Linux FS Devel <>, 
	Linux Security Module <>, 
	Akinobu Mita <>, Alexey Dobriyan <>, 
	Andrew Morton <>, Andy Lutomirski <>, 
	Daniel Micay <>, Djalal Harouni <>, 
	"Dmitry V . Levin" <>, Greg Kroah-Hartman <>, 
	Ingo Molnar <>, "J . Bruce Fields" <>, 
	Jeff Layton <>, Jonathan Corbet <>, 
	Kees Cook <>, Oleg Nesterov <>, 
	Solar Designer <>
Subject: Re: [PATCH v8 07/11] proc: flush task dcache entries from all procfs instances

On Wed, Feb 12, 2020 at 9:55 PM Al Viro <> wrote:
> What I don't understand is the insistence on getting those dentries
> via dcache lookups.

I don't think that's an "insistence", it's more of a "historical
behavior" together with "several changes over the years to deal with
dentry-level cleanups and updates".

> _IF_ we are willing to live with cacheline
> contention (on ->d_lock of root dentry, if nothing else), why not
> do the following:
>         * put all dentries of such directories ([0-9]* and [0-9]*/task/*)
> into a list anchored in task_struct; have non-counting reference to
> task_struct stored in them (might simplify part of get_proc_task() users,


Right now I don't think we actually create any dentries at all for the
short-lived process case.

Wouldn't your suggestion make fork/exit rather worse?

Or would you create the dentries dynamically still at lookup time, and
then attach them to the process at that point?

What list would you use for the dentry chaining? Would you play games
with the dentry hashing, and "hash" them off the process, and never
hit in the lookup cache?

Am I misunderstanding what you suggest?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.