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:	Tue, 17 Dec 2013 08:50:55 -0500
From:	Jeff Layton <jlayton@...hat.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	nfs-ganesha-devel@...ts.sourceforge.net,
	samba-technical@...ts.samba.org
Subject: Re: [PATCH v3 6/6] locks: add new "private" lock type that is owned
 by the filp

On Tue, 17 Dec 2013 05:37:21 -0800
Christoph Hellwig <hch@...radead.org> wrote:

> On Tue, Dec 17, 2013 at 08:31:25AM -0500, Jeff Layton wrote:
> > So, I think the above semantics are pretty clear, but now that I've had
> > a go at sitting down to document this stuff for the POSIX spec and
> > manpages, it's clear how convoluted the text in there is becoming.
> > 
> > That makes me wonder...would we be better off with a new set of cmd
> > values here instead of new l_type values? IOW, we could add new:
> > 
> > F_GETLKP
> > F_SETLKP
> > F_SETLKPW
> 
> That seems a tad cleaner to me indeed.
> 
> > ...and then just reuse the same F_RDLCK/F_WRLCK/F_UNLCK values? With
> > that too, we could create a new equivalent to struct flock that has
> > fixed length types instead of dealing with the off_t mess.
> 
> For the Posix interface you'd need an off_t as that's what the whole
> API uses for file offsets.  We could make sure to always use a off64_t
> for the kernel interface though.
> 

Ok.

> What is the API you propose to posix?  An new posix_lockf?
> 

I haven't proposed anything concrete to POSIX just yet. I'm trying to
get the Linux patches done and then I'll do that. I don't think we want
a new syscall when fcntl() will work.

If we use new cmd values however, then we don't necessarily need to use
struct flock/flock64. I think the question is -- should we stick with
struct flock/flock64, or would we be better served with something new
for this?

Thanks,
-- 
Jeff Layton <jlayton@...hat.com>
--
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