lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Jun 2012 13:14:36 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Mimi Zohar <zohar@...ux.vnet.ibm.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	". James Morris" <jmorris@...ei.org>,
	linux-security-module@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Oleg Nesterov <oleg@...hat.com>,
	David Miller <davem@...emloft.net>
Subject: Re: deferring __fput()

On Mon, Jun 25, 2012 at 02:03:25PM +0200, Peter Zijlstra wrote:
> On Sat, 2012-06-23 at 21:57 +0100, Al Viro wrote:
> > 3) at that point task_work is equal in size (and layout, BTW) to rcu_head.  So we can add it
> > into the same union in struct file where we already have list_head and rcu_head.  No space
> > eaten up.  fput() would, once the counter reaches 0, remove the file from list (the only
> > place walking that list skips the ones with zero refcount anyway) and, if we are in a normal
> > process, use task_work_add() to have __fput() done to it.  If we are in kernel thread or
> > atomic context, just move the sucker to global list and use schedule_work() to have said
> > list emptied and everything in it fed to __fput(). 
> 
> So we're now Ok with doing fput() async?
> 
> Last time I remember this coming up people thought this wasn't such a
> hot idea.

You mean, doing that from RCU callbacks?  Still a bad idea, IMO; you will end up with a context
switch and unpleasantness with delayed user-visible effects of syscalls.  With aio we did have
a delayed execution of fput() anyway; all that has changed there is that we use generic
mechanism instead of home-grown analog thereof.

I'll need to reread that thread to comment on the specifics (had been too long ago; I don't
remember the details), but...  See Linus' objections to full-async fput() circa this April
or March.  There's a reason why this patchset uses task_work_add() whenever possible.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ