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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2863583A-79F1-4998-8AC4-1C4C9D4C060F@dilger.ca>
Date:   Thu, 6 Jul 2017 12:27:21 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     David Howells <dhowells@...hat.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-api@...r.kernel.org, torvalds@...ux-foundation.org,
        linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] afs: Add metadata xattrs

On Jul 6, 2017, at 10:14 AM, David Howells <dhowells@...hat.com> wrote:
> 
> Christoph Hellwig <hch@...radead.org> wrote:
> 
>> NAK.  Don't overload xattrs with magic behavior just to avoid the need
>> to do proper syscalls or ioctls.
> 
> How?  This has to work on non-files, files you can't open and mountpoints.
> You can't do an ioctl() on a file opened O_PATH:
> 
> 	if (unlikely(f->f_flags & O_PATH)) {
> 		f->f_mode = FMODE_PATH;
> 		f->f_op = &empty_fops;
> 		return 0;
> 	}
> 
> and you can't specify AT_NO_AUTOMOUNT or AT_NO_FOLLOW to openat(), so ioctl()
> is of no use here.
> 
> Do you advocate introducing a pioctl() call?  Linus was dead-set against that
> as I recall.
> 
> I could invent a bunch of AFS-specific syscalls, but I'd rather not do that or
> I suppose bring my fsinfo() patches up to scratch - but you didn't like those
> either.
> 
> Note that using xattrs for fs info is not without precedent in Linux - cifs,
> for example.

IMHO, xattrs are a fairly reasonable interface for accessing filesystem-specific
attributes of a file that do not have generic equivalents on other filesystems.
I can't see there being much value to having AFS-specific syscalls, and xattrs
also are more easily accessed by generic userspace tools than ioctl() calls.

There is also the general negative opinion among kernel developers to adding new
ioctls in the first place that means there are few options for how to get
non-standard information.

I could imagine that "fid" (file identifier that is larger than 64-bit inode) is
common enough that it could be added to statx(). I think at least "volume" (maybe
as "label") and "cell" (maybe == "server" or "fsname"?) could be generic part of
fsinfo if there was some willingness to accept that interface upstream.

Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ