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:	Sat, 14 Mar 2009 00:02:08 -0400
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Eric Dumazet <dada1@...mosbay.com>,
	Jeff Moyer <jmoyer@...hat.com>, Avi Kivity <avi@...hat.com>,
	linux-aio <linux-aio@...ck.org>, zach.brown@...cle.com,
	Benjamin LaHaise <bcrl@...ck.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH] fs: fput() can be called from interrupt context

On Fri, 2009-03-13 at 18:40 -0700, Davide Libenzi wrote:
> On Fri, 13 Mar 2009, Trond Myklebust wrote:
> 
> > On Thu, 2009-03-12 at 06:39 -0700, Davide Libenzi wrote:
> > > On Wed, 11 Mar 2009, Andrew Morton wrote:
> > > 
> > > > > Take the time to check how fs/aio.c handle the fput(req->ki_filp) case
> > > > > (or read my 2nd patch, it should spot the thing)
> > > > 
> > > > Well yes, a kludge like that seems a bit safer.
> > > > 
> > > > It's somewhat encouraging that we're apparently already doing fput()
> > > > from within keventd (although how frequently?).  There might be
> > > > problems with file locking, security code, etc from doing fput() from
> > > > an unexpected thread.  And then there are all the usual weird problem
> > > > with using the keventd queues which take a long time to get discovered.
> > > 
> > > Would it be a huge problem, performance-wise, to stop making ->f_count 
> > > tricks in __aio_put_req, and always offload to fput_work the task of 
> > > releasing the requests?
> > > If that's a huge problem, IMO the lower impact fix would be to use 
> > > aio_fput_routine to loop into a second list, releasing the eventual 
> > > eventfd file*. There's no need, IMO, to turn the whole fput() into 
> > > IRQ-callable just for this case, when we can contain it into the 
> > > particular KAIO+eventfd usage.
> > > 
> > 
> > Do you really want to see eventd doing umounts and remote flock() calls?
> > This really needs to be run in a thread that can cope with __long__
> > waits, unavailable servers, etc...
> 
> Did I miss something? This wouldn't be (eventually) on keventd shoulders, 
> but on aio work queue (aio_wq).
> I guess we could do the same optimization we're already doing for ki_filp, 
> for ki_eventfd ...

Last I checked, a call to schedule_work(&fddef->wq) would still run
fd_defer_queue() under keventd.

That said, even if you were to run it under aio_wq, the argument remains
the same: do you really want to add potentially long lasting sleeps onto
a work queue that was designed to service fast i/o requests?

Trond

--
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