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]
Message-ID: <26026.1277851016@redhat.com>
Date:	Tue, 29 Jun 2010 23:36:56 +0100
From:	David Howells <dhowells@...hat.com>
To:	Ulrich Drepper <drepper@...il.com>
Cc:	dhowells@...hat.com, viro@...iv.linux.org.uk, smfrench@...il.com,
	jlayton@...hat.com, mcao@...ibm.com,
	aneesh.kumar@...ux.vnet.ibm.com, linux-cifs@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	samba-technical@...ts.samba.org, sjayaraman@...e.de,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 3/3] Add a pair of system calls to make extended file stats available

Ulrich Drepper <drepper@...il.com> wrote:

> On Tue, Jun 29, 2010 at 13:03, David Howells <dhowells@...hat.com> wrote:
> > Add a pair of system calls to make extended file stats available,
> > including file creation time, inode version and data version where
> > available through the underlying filesystem:
> 
> If you add something like this you might want to integrate another
> extension.  This has been discussed a long time ago.  In almost no
> situation all the information is needed.  Some of the pieces of
> information returned by the syscall might be harder to collect than
> other.

Trond mentioned this:

	There has been a lot of interest in allowing the user to specify
	exactly which fields they want the filesystem to return, and whether
	or not the kernel can use cached data or not. The main use is to allow
	specification of a 'stat light' that could help speed up
	"readdir()+multiple stat()" type queries. At last year's Filesystem
	and Storage Workshop, Mark Fasheh actually came up with an initial
	design:

	  http://www.kerneltrap.com/mailarchive/linux-fsdevel/2009/4/7/5427274

It'd be easy enough to absorb the functionality from that patch.

> It makes sense in such a situation to allow the caller to specify what she
> is interested in.  A bitmask of some sort.

I have one of those.  See the query_flags field.  One question, though, is how
to break things down.  Obvious groupings of the already extant stat stuff
might be:

	- st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, st_size
	- st_block, st_blksize
	- st_atime, st_mtime, st_ctime

However, what seems obvious to me might not be for some netfs or other.

> For this the syscall interface should have a parameter to specify what
> is requested and the stat-like structure should have a field
> specifying what is actually present.  The latter bitmask must be a
> superset of the former.

Got that.

> Previous discussions centered around reusing the stat data structure
> and somehow make it work.  But no clean solution was found.  If a new
> structure is added anyway this could solve the issue.

That's what I thought.  Linux has a tangled mess of stat structs:-/

> And while you're at it, maybe some spare fields at the end are nice.

I made it so that the syscall can return variable length data: the main xstat
struct, plus extra records yet to be defined.  They could even be variable
length and assembled/disassembled with something like the control message
macros for recvmsg().

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