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:	Thu, 1 Sep 2011 09:34:52 -0700
From:	Jeremy Allison <jra@...ba.org>
To:	Jeremy Allison <jra@...ba.org>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Ulrich Drepper <drepper@...adia.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Daniel Ehrenberg <dehrenberg@...gle.com>,
	Jens Axboe <axboe@...nel.dk>, Jeff Moyer <jmoyer@...hat.com>,
	linux-kernel@...r.kernel.org, linux-aio@...ck.org
Subject: Re: Approaches to making io_submit not block

On Thu, Sep 01, 2011 at 09:31:07AM -0700, Jeremy Allison wrote:
> On Thu, Sep 01, 2011 at 12:23:37PM -0400, Christoph Hellwig wrote:
> > On Thu, Sep 01, 2011 at 09:15:31AM -0700, Jeremy Allison wrote:
> > > > We could easily give you an fcntl / dup3 flag to only release posix
> > > > locks on the final close of a struct file if that helps you.
> > > 
> > > That would help us enormously - it'd be Linux only of course but
> > > we could easily add support for that.
> > > 
> > > Can you propose the design here so we can run it past some of the
> > > Solaris/FreeBSD folks (it'd be nice if we could get broader adoption) ?
> > 
> > Not sure there is all that much to discuss.  The idea is to have locks
> > that behave like Posix locks, but only get release when the last duped
> > fd to them gets released.
> > 
> > We'd define a new O_LOCKS_WHATEVER flag for it, which gets set either
> > using fcntl(..., F_SETFL, ...) or dup3.  All in all that should be less
> > than 50 lines of code in the kernel.
> 
> Ok, so it'd be set at open() time, say:
> 
> O_CLOLOCK_PERSIST
> 
> (to match the naming of something like O_CLOEXEC) and be available to set
> with F_SETFD via an fcntl and dup3 call ?

Ah, looking at fcntl - do you want to set/get this via F_SETFD/F_GETFD,
or via F_SETFL/F_GETFL ? i.e. is this a file descritor flag, or a status
flag ? I'd guess a file descriptor flag but I'm not sure of the difference
here..

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