Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 11:00:39AM -0500, Eric W. Biederman wrote: > Nikolay Borisov writes: > > > Currently when /proc/locks is read it will show all the file locks > > which are currently created on the machine. On containers, hosted > > on busy servers this means that doing lsof can be very sl

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 06:20:32PM +0300, Nikolay Borisov wrote: > On 08/02/2016 06:05 PM, J. Bruce Fields wrote: > > (And what process was actually reading /proc/locks, out of curiosity?) > > lsof in my case Oh, thanks, and you said that at the start, and I overlooked it--apologi

Re: [RFC PATCH] locks: Show only file_locks created in the same pidns as current process

2016-08-02 Thread J. Bruce Fields
On Tue, Aug 02, 2016 at 05:42:23PM +0300, Nikolay Borisov wrote: > Currently when /proc/locks is read it will show all the file locks > which are currently created on the machine. On containers, hosted > on busy servers this means that doing lsof can be very slow. I > observed up to 5 seconds stall

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 03:23:07PM +0100, Al Viro wrote: > On Sun, Jul 24, 2016 at 08:10:14AM -0400, J. Bruce Fields wrote: > > On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > > > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > &g

Re: [PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-24 Thread J. Bruce Fields
On Sun, Jul 24, 2016 at 01:22:06AM +0100, Al Viro wrote: > On Fri, Jul 22, 2016 at 01:48:52PM -0400, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > > > I'm not sure why this was added. It doesn't seem necessary, and no > > other caller d

[PATCH 7/7] nfsd: drop unnecessary MAY_EXEC check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" We need an fh_verify to make sure we at least have a dentry, but actual permission checks happen later. Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4proc.c | 7 +-- fs/nfsd/vfs.c | 6 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff

[PATCH 5/7] nfsd: remove unnecessary positive-dentry check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" vfs_{create,mkdir,mknod} each begin with a call to may_create(), which returns EEXIST if the object already exists. This check is therefore unnecessary. (In the NFSv2 case, nfsd_proc_create also has such a check. Contrary to RFC 1094, our code seems to beli

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" On Fri, Jul 22, 2016 at 11:13:20AM -0400, Oleg Drokin wrote: > Hm, in fact indeed. I was just too worked up about the client side, > but on the server side there was a real lookup already, so it does > look workable. So I end up with the following.

[PATCH 6/7] nfsd: clean up bad-type check in nfsd_create_locked

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" Minor cleanup, no change in behavior. Signed-off-by: J. Bruce Fields --- fs/nfsd/vfs.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index d45b39b408a1..cd06c6511cfc 100644 --- a/fs/nfsd/vfs.

[PATCH 1/7] nfsd: Make creates return EEXIST instead of EACCES

2016-07-22 Thread J. Bruce Fields
n the local cache or not. Another positive side effect is certain programs only expect EEXIST in that case even despite POSIX allowing any valid error to be returned. Signed-off-by: Oleg Drokin Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4proc.c | 6 +- fs/nfsd/vfs.c | 11 ++- 2

[PATCH 2/7] nfsd: remove redundant zero-length check from create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" lookup_one_len already has this check. The only effect of this patch is to return access instead of perm in the 0-length-filename case. I actually prefer nfserr_perm (or _inval?), but I doubt anyone cares. The isdotent check seems redundant too, but I worry

[PATCH 3/7] nfsd: remove redundant i_lookup check

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" I'm not sure why this was added. It doesn't seem necessary, and no other caller does this. Signed-off-by: J. Bruce Fields --- fs/nfsd/vfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index fba8e7e521e0.

[PATCH 4/7] nfsd: reorganize nfsd_create

2016-07-22 Thread J. Bruce Fields
From: "J. Bruce Fields" There's some odd logic in nfsd_create() that allows it to be called with the parent directory either locked or unlocked. The only already-locked caller is NFSv2's nfsd_proc_create(). It's less confusing to split out the unlocked case into a se

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-22 Thread J. Bruce Fields
On Fri, Jul 22, 2016 at 02:35:26AM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 9:57 PM, J. Bruce Fields wrote: > > > On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > >> > >> On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Thu, Jul 21, 2016 at 04:37:40PM -0400, Oleg Drokin wrote: > > On Jul 21, 2016, at 4:34 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > >> > >> On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > >>

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-21 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 05:53:19PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 4:54 PM, J. Bruce Fields wrote: > > > On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > >> It looks like we are bit overzealous about failing mkdir/create/mknod > >&

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 04:46:14PM +0200, Miklos Szeredi wrote: > On Tue, Jul 19, 2016 at 4:01 PM, J. Bruce Fields wrote: > > On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > >> This patch allows flock, posix locks, ofd locks and leases to work > >

Re: [RFC PATCH] locks: fix file locking on overlayfs

2016-07-19 Thread J. Bruce Fields
On Tue, Jul 19, 2016 at 02:27:44PM +0200, Miklos Szeredi wrote: > This patch allows flock, posix locks, ofd locks and leases to work > correctly on overlayfs. > > Instead of using the underlying inode for storing lock context use the > overlay inode. This allows locks to be persistent across copy

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-13 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:41:41PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 11:10 PM, Al Viro wrote: > > > On Fri, Jul 08, 2016 at 05:47:22PM -0400, Oleg Drokin wrote: > > > >> I wonder if people just accept that "NFS is just weird" and code in > >> workarounds, > >> where as with Lustr

Re: [PATCH v23 17/22] richacl: Automatic Inheritance

2016-07-12 Thread J. Bruce Fields
On Tue, Jul 12, 2016 at 07:56:00AM -0400, Jeff Layton wrote: > On Thu, 2016-06-30 at 15:47 +0200, Andreas Gruenbacher wrote: > > Automatic Inheritance (AI) allows changes to the acl of a directory to > > propagate down to children. > > > > This is mostly implemented in user space: when a process c

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Thu, Jul 07, 2016 at 09:47:46PM -0400, Oleg Drokin wrote: > It looks like we are bit overzealous about failing mkdir/create/mknod > with permission denied if the parent dir is not writeable. > Need to make sure the name does not exist first, because we need to > return EEXIST in that case. > >

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 12:16:14PM -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 12:04 PM, J. Bruce Fields wrote: > > > On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > >> On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > >>> On Jul 8,

Re: [PATCH] nfsd: Correct a comment for NFSD_MAY_ defines location

2016-07-08 Thread J. Bruce Fields
Thanks, applied.--b. On Fri, Jul 08, 2016 at 06:45:31AM -0400, Jeff Layton wrote: > On Thu, 2016-07-07 at 21:49 -0400, Oleg Drokin wrote: > > Those are now defined in fs/nfsd/vfs.h > > > > Signed-off-by: Oleg Drokin > > --- > >  fs/nfsd/nfsfh.c | 2 +- > >  1 file changed, 1 insertion(+), 1 delet

Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM

2016-07-08 Thread J. Bruce Fields
On Fri, Jul 08, 2016 at 11:53:28AM -0400, Jeff Layton wrote: > On Fri, 2016-07-08 at 11:14 -0400, Oleg Drokin wrote: > > On Jul 8, 2016, at 7:02 AM, Jeff Layton wrote: > > > > > On Thu, 2016-07-07 at 21:47 -0400, Oleg Drokin wrote: > > > > It looks like we are bit overzealous about failing mkdir/c

Re: [PATCH 2/2] nfsd: remove extraneous KERN_INFO prefix

2016-07-06 Thread J. Bruce Fields
Thanks, applying both patches.--b. On Sat, Jul 02, 2016 at 08:24:48AM +0200, Christophe JAILLET wrote: > smatch complains about using KERN_INFO as a prefix when calling dprintk > > Signed-off-by: Christophe JAILLET > --- > fs/nfsd/nfs4state.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

[GIT PULL] lockd/locks bugfixes for 4.7

2016-07-01 Thread J. Bruce Fields
Please pull from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-3 One fix for lockd soft lookups in an error path, and one fix for file leases on overlayfs.

Re: [PATCH] locks: use file_inode()

2016-07-01 Thread J. Bruce Fields
uan > > Signed-off-by: Miklos Szeredi > > Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay > > and f_inode to the underlay") > > Cc: > > Cc: Jeff Layton > > Cc: "J. Bruce Fields" > > --- > >  fs/lock

[GIT PULL] bugfixes for 4.7

2016-06-24 Thread J. Bruce Fields
Please pull the following nfsd changes from the nfsd-4.7-2 tag at: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.7-2 --b. Fix missing server-side permission checks on setting NFS ACLs. --

Re: [svcrpc] 12e5cf2d75: BUG: unable to handle kernel NULL pointer dereference at 0000000000000014

2016-06-17 Thread J. Bruce Fields
On Fri, Jun 17, 2016 at 02:09:32PM +0800, kernel test robot wrote: > > FYI, we noticed the following commit: Yes, that patch was obviously just wrong, I'm not sure how it was passing my own tests. Anyway, dropped, thanks. --b. > > https://github.com/0day-ci/linux > Chuck-Lever/NFS-RDMA-clien

[GIT PULL] nfsd bugfixes for 4.7

2016-06-16 Thread J. Bruce Fields
. Geert Uytterhoeven (1): nfsd: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix J. Bruce Fields (3): SUNRPC: fix xprt leak on xps allocation failure nfsd4/rpc: move backchannel create logic into rpc code rpc: share one xps between all backchannels Oleg Drokin

Re: [PATCH 0/3] nfsd state handling fixes

2016-06-15 Thread J . Bruce Fields
On Wed, Jun 15, 2016 at 09:54:28PM -0400, Oleg Drokin wrote: > > On Jun 14, 2016, at 11:28 PM, Oleg Drokin wrote: > > > These three patches do the much discussed job of making nfsd state handling > > more robust in face of races where several opens arrive for the same file > > at the same time fr

Re: [PATCH v2] nfsd: Always lock state exclusively.

2016-06-15 Thread J . Bruce Fields
On Tue, Jun 14, 2016 at 10:19:49PM -0400, Oleg Drokin wrote: > On Jun 14, 2016, at 2:46 PM, J . Bruce Fields wrote: > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > > index fa5fb5aa4847..41b59854c40f 100644 > > --- a/fs/nfsd/nfs4state.c > > +++ b/fs/nfsd/

Re: [PATCH v2] nfsd: Always lock state exclusively.

2016-06-14 Thread J . Bruce Fields
On Tue, Jun 14, 2016 at 11:53:27AM -0400, Oleg Drokin wrote: > > On Jun 14, 2016, at 11:38 AM, J . Bruce Fields wrote: > > > On Sun, Jun 12, 2016 at 09:26:27PM -0400, Oleg Drokin wrote: > >> It used to be the case that state had an rwlock that was locked for write >

Re: [PATCH v2] nfsd: Always lock state exclusively.

2016-06-14 Thread J . Bruce Fields
On Tue, Jun 14, 2016 at 11:56:20AM -0400, Oleg Drokin wrote: > > On Jun 14, 2016, at 11:46 AM, J . Bruce Fields wrote: > > > On Sun, Jun 12, 2016 at 09:26:27PM -0400, Oleg Drokin wrote: > >> It used to be the case that state had an rwlock that was locked for write >

Re: [PATCH v2] nfsd: Always lock state exclusively.

2016-06-14 Thread J . Bruce Fields
On Sun, Jun 12, 2016 at 09:26:27PM -0400, Oleg Drokin wrote: > It used to be the case that state had an rwlock that was locked for write > by downgrades, but for read for upgrades (opens). Well, the problem is > if there are two competing opens for the same state, they step on > each other toes pot

Re: [PATCH v2] nfsd: Always lock state exclusively.

2016-06-14 Thread J . Bruce Fields
On Sun, Jun 12, 2016 at 09:26:27PM -0400, Oleg Drokin wrote: > It used to be the case that state had an rwlock that was locked for write > by downgrades, but for read for upgrades (opens). Well, the problem is > if there are two competing opens for the same state, they step on > each other toes pot

Re: [PATCH] nfsd: Close a race between access checking/setting in nfs4_get_vfs_file

2016-06-10 Thread J . Bruce Fields
On Fri, Jun 10, 2016 at 06:50:33AM -0400, Jeff Layton wrote: > On Fri, 2016-06-10 at 00:18 -0400, Oleg Drokin wrote: > > On Jun 9, 2016, at 5:01 PM, Oleg Drokin wrote: > > > > > Currently there's an unprotected access mode check in > > > nfs4_upgrade_open > > > that then calls nfs4_get_vfs_file wh

Re: [PATCH] nfds: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix

2016-06-06 Thread J. Bruce Fields
On Sun, Jun 05, 2016 at 06:21:43AM -0400, Jeff Layton wrote: > On Sun, 2016-06-05 at 11:23 +0200, Geert Uytterhoeven wrote: > > On 32-bit: > > > > fs/nfsd/blocklayout.c: In function ‘nfsd4_block_get_device_info_scsi’: > > fs/nfsd/blocklayout.c:337: warning: integer constant is too large fo

Re: kernel BUG at linux-3.16.7-ckt25/fs/dcache.c:2373!

2016-06-03 Thread J. Bruce Fields
On Fri, Jun 03, 2016 at 11:17:16AM +0200, Philipp Hahn wrote: > Hello, > > Am 02.06.2016 um 22:02 schrieb J. Bruce Fields: > > On Thu, Jun 02, 2016 at 09:51:27AM +0200, Philipp Hahn wrote: > >> probably during heavy IO our file server crashed on a BUG_ON in dache.c, > &

Re: kernel BUG at linux-3.16.7-ckt25/fs/dcache.c:2373!

2016-06-02 Thread J. Bruce Fields
On Thu, Jun 02, 2016 at 09:51:27AM +0200, Philipp Hahn wrote: > Hello, > > probably during heavy IO our file server crashed on a BUG_ON in dache.c, > probably triggered by NFS: > > > [ cut here ] > > kernel BUG at > > /var/build/temp/tmp.BPql4ErveJ/pbuilder/linux-3.16.7-c

[GIT PULL] nfsd changes for 4.7

2016-05-24 Thread J. Bruce Fields
svcrdma: Drain QP before freeing svcrdma_xprt svcrdma: Eliminate code duplication in svc_rdma_recvfrom() svcrdma: Generalize svc_rdma_xdr_decode_req() J. Bruce Fields (2): Remove unnecessary allocation svcrpc: autoload rdma module Jeff Layton (1): nfsd: handle seqid

Re: [PATCH 1/6] statx: Add a system call to make enhanced file info available

2016-05-08 Thread J. Bruce Fields
On Mon, May 09, 2016 at 11:45:43AM +1000, Dave Chinner wrote: > [ OT, but I'll reply anyway :P ] > > On Fri, May 06, 2016 at 02:29:23PM -0400, J. Bruce Fields wrote: > > On Thu, May 05, 2016 at 08:56:02AM +1000, Dave Chinner wrote: > > > In the latest XFS filesy

Re: [PATCH 1/6] statx: Add a system call to make enhanced file info available

2016-05-06 Thread J. Bruce Fields
On Thu, May 05, 2016 at 08:56:02AM +1000, Dave Chinner wrote: > IMO, exposing the inode generation number to anyone is a potential > security problem because they are used in file handles. > > Most file handles provided by filesystems are simply an encoding of > the inode number + generation numbe

Re: [PATCH 1/6] statx: Add a system call to make enhanced file info available

2016-05-06 Thread J. Bruce Fields
On Thu, May 05, 2016 at 03:48:16PM -0400, Jeff Layton wrote: > On Thu, 2016-05-05 at 10:09 +1000, NeilBrown wrote: > > On Thu, May 05 2016, Dave Chinner wrote: > > > > > > > > On Fri, Apr 29, 2016 at 01:57:43PM +0100, David Howells wrote: > > > > > > > >  (4) File creation time (st_btime*), data

Re: [PATCH 13/15] parallel lookups machinery, part 3

2016-04-18 Thread J. Bruce Fields
On Sat, Apr 16, 2016 at 01:55:25AM +0100, Al Viro wrote: > From: Al Viro > > We will need to be able to check if there is an in-lookup > dentry with matching parent/name. Right now it's impossible, > but as soon as start locking directories shared such beasts > will appear. > > Add a secondary

Re: [PATCH 07/15] reconnect_one(): use lookup_one_len_unlocked()

2016-04-18 Thread J. Bruce Fields
On Sat, Apr 16, 2016 at 01:55:19AM +0100, Al Viro wrote: > From: Al Viro > > ... and explain the non-obvious logics in case when lookup yields > a different dentry. ACK to this independent of the rest of the series, my only minor gripe is that the point made in this new comment is also made at o

Re: [PATCH] nfds: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix

2016-03-28 Thread J. Bruce Fields
On Fri, Mar 25, 2016 at 07:04:22PM +0100, Christoph Hellwig wrote: > Looks fine, thanks! > > Reviewed-by: Christoph Hellwig Thanks, applying for 4.6.--b.

[GIT PULL] nfsd changes for 4.6, take 2

2016-03-24 Thread J. Bruce Fields
I for RPC-over-RDMA server send CQs J. Bruce Fields (4): nfsd4: fix bad bounds checking nfsd4: resfh unused in nfsd4_secinfo nfsd: fix deadlock secinfo+readdir compound nfsd: better layoutupdate bounds-checking Kinglong Mee (1): nfsd: Fix a memory leak when me

Re: [GIT PULL] nfsd changes for 4.6

2016-03-24 Thread J. Bruce Fields
On Thu, Mar 24, 2016 at 03:00:55PM -0400, Trond Myklebust wrote: > On Thu, Mar 24, 2016 at 9:35 AM, J. Bruce Fields wrote: > > Please pull nfsd changes for 4.6 from > > > > git://linux-nfs.org/~bfields/li

[GIT PULL] nfsd changes for 4.6

2016-03-24 Thread J. Bruce Fields
logic to return ERR_CHUNK svcrdma: Remove close_out exit path svcrdma: Use new CQ API for RPC-over-RDMA server receive CQs svcrdma: Use new CQ API for RPC-over-RDMA server send CQs J. Bruce Fields (3): nfsd4: fix bad bounds checking nfsd4: resfh unused in nfsd4_se

Re: [RFD] workqueue: WQ_MEM_RECLAIM usage in network drivers

2016-03-19 Thread J. Bruce Fields
On Fri, Mar 18, 2016 at 04:46:23PM -0400, Tejun Heo wrote: > Hello, Jeff. > > On Thu, Mar 17, 2016 at 09:32:16PM -0400, Jeff Layton wrote: > > > * Are network devices expected to be able to serve as a part of > > > storage stack which is depended upon for memory reclamation? > > > > I think the

Re: [PATCH v18 19/22] richacl: Add richacl xattr handler

2016-03-15 Thread J. Bruce Fields
On Tue, Mar 15, 2016 at 12:10:14AM -0700, Christoph Hellwig wrote: > On Fri, Mar 11, 2016 at 09:19:05AM -0500, J. Bruce Fields wrote: > > On Fri, Mar 11, 2016 at 06:17:35AM -0800, Christoph Hellwig wrote: > > > On Mon, Feb 29, 2016 at 09:17:24AM +0100, Andreas Gruenbacher

Re: [PATCH] nfsd: recover: fix memory leak

2016-03-14 Thread J. Bruce Fields
On Mon, Mar 07, 2016 at 03:40:03PM +0530, Sudip Mukherjee wrote: > nfsd4_cltrack_grace_start() will allocate the memory for grace_start but > when we returned due to error we missed freeing it. Thanks, applying for 4.6.--b. > > Signed-off-by: Sudip Mukherjee > --- > fs/nfsd/nfs4recover.c | 1 +

Re: [PATCH v18 19/22] richacl: Add richacl xattr handler

2016-03-11 Thread J. Bruce Fields
On Fri, Mar 11, 2016 at 06:17:35AM -0800, Christoph Hellwig wrote: > On Mon, Feb 29, 2016 at 09:17:24AM +0100, Andreas Gruenbacher wrote: > > Add richacl xattr handler implementing the xattr operations based on the > > get_richacl and set_richacl inode operations. > > Given all the issues with Pos

Re: [PATCH v18 00/22] Richacls (Core and Ext4)

2016-03-11 Thread J. Bruce Fields
On Fri, Mar 11, 2016 at 06:01:34AM -0800, Christoph Hellwig wrote: > On Mon, Feb 29, 2016 at 09:17:05AM +0100, Andreas Gruenbacher wrote: > > Al, > > > > could you please make sure you are happy with the current version of the > > richacl patch queue for the next merge window? > > I'm still not h

[GIT PULL] nfsd bugfix for 4.5

2016-02-24 Thread J. Bruce Fields
Please pull an nfsd bugfix for 4.5 from git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.5-1 One fix for a bug that could cause a NULL write past the end of a buffer in case of unusually long writes to some system interfaces used by mountd and other nfs support utilities. --b. Stefan Hajnoc

Re: call_usermodehelper in containers

2016-02-23 Thread J. Bruce Fields
On Tue, Feb 23, 2016 at 10:55:30AM +0800, Ian Kent wrote: > You know, wrt. the mechanism Oleg suggested, I've been wondering if it's > even necessary to capture process template information for execution. > > Isn't the main issue the execution of unknown arbitrary objects getting > access to a pri

Re: richacl(7) man page review comments

2016-02-10 Thread J. Bruce Fields
On Sun, Feb 07, 2016 at 05:35:46PM +0100, Michael Kerrisk (man-pages) wrote: > > This permission is always implicitly granted. > > .HP > > .B write_attributes > > .RB ( A ): > > Change the times associated with a file or directory to an arbitrary value. > > This permission is always implicitly gran

Re: kernel pruning script..

2016-02-08 Thread J. Bruce Fields
to copy it > from an old machine every time, because it will just be there with the > kernel source tree (and without a kernel source tree it's not needed). > > Linus > > On Wed, Jul 10, 2013 at 1:54 PM, J. Bruce Fields wrote: > > > > I run this by h

Re: [PATCH/RFC] VFS: Improve fairness when locking the per-superblock s_anon list

2016-02-02 Thread J. Bruce Fields
On Tue, Feb 02, 2016 at 03:10:43PM +1100, NeilBrown wrote: > On Tue, Feb 02 2016, J. Bruce Fields wrote: > > > On Fri, Jan 29, 2016 at 11:17:43AM +1100, NeilBrown wrote: > >> bit-spin-locks, as used for dcache hash chains, are not fair. > >> This is not a proble

Re: [PATCH/RFC] VFS: Improve fairness when locking the per-superblock s_anon list

2016-02-01 Thread J. Bruce Fields
On Fri, Jan 29, 2016 at 11:17:43AM +1100, NeilBrown wrote: > bit-spin-locks, as used for dcache hash chains, are not fair. > This is not a problem for the dcache hash table as different CPUs are > likely to access different entries in the hash table so high contention > is not expected. > However a

Re: [LKP] [lkp] [locks] 7f3697e24d: +35.1% will-it-scale.per_thread_ops

2016-02-01 Thread J. Bruce Fields
On Fri, Jan 29, 2016 at 10:52:20AM +0800, Huang, Ying wrote: > Jeff Layton writes: > > > On Fri, 29 Jan 2016 09:32:19 +0800 > > kernel test robot wrote: > > > >> FYI, we noticed the below changes on > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > >> commit

Re: linux-next: manual merge of the rdma tree with the nfsd tree

2016-01-06 Thread J. Bruce Fields
On Wed, Jan 06, 2016 at 07:01:14AM -0500, Chuck Lever wrote: > Part of the plan was that Doug's tree would be merged before > Bruce's. But the above problem description looks like the > maintainer trees were merged into linux-next in the other order. The order makes no difference. The problem is

Re: [PATCH] lockd: constify nlmsvc_binding structure

2016-01-04 Thread J. Bruce Fields
On Wed, Dec 23, 2015 at 10:25:13PM +0100, Julia Lawall wrote: > The nlmsvc_binding structure is never modified, so declare it as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > > --- > > This assumes that whoever takes advantage of the EXPORT_SYMBOL will also > n

Re: [PATCH 3/3] lockd: use to_delayed_work

2016-01-04 Thread J. Bruce Fields
On Fri, Jan 01, 2016 at 10:06:29PM +0800, Geliang Tang wrote: > Use to_delayed_work() instead of open-coding it. Thanks, applying 2/3 and 3/3 for 4.5.--b. > > Signed-off-by: Geliang Tang > --- > fs/lockd/svc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/lockd

Re: linux-next: manual merge of the rdma tree with the nfsd tree

2016-01-04 Thread J. Bruce Fields
On Sun, Jan 03, 2016 at 09:53:20PM -0500, Doug Ledford wrote: > On 01/03/2016 08:44 PM, Stephen Rothwell wrote: > > Hi all, > > > > On Thu, 31 Dec 2015 13:30:22 +1100 Stephen Rothwell > > wrote: > >> > >> Hi Doug, > >> > >> Today's linux-next merge of the rdma tree got conflicts in a quite a > >

[GIT PULL] nfsd fix for 4.4

2015-12-21 Thread J. Bruce Fields
Please pull an nfsd change for 4.4: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.4-1 Just one fix for a NFSv4 callback bug introduced in 4.4. Jeff Layton (1): nfsd: don't hold ls_mutex across a layout recall fs/nfsd

Re: [RFC][PATCH 00/12] Enhanced file stat system call

2015-11-25 Thread J. Bruce Fields
On Fri, Nov 20, 2015 at 04:28:35PM +, David Howells wrote: > Martin Steigerwald wrote: > > > Any plans to add limitations of filesystem to the call like maximum file > > size? I know its mostly relevant for just for FAT32, but on any account > > rather than trying to write 4 GiB and then fil

Re: [PATCH] nfsd: constify nfsd4_callback_ops structure

2015-11-23 Thread J. Bruce Fields
On Sun, Nov 22, 2015 at 09:57:42AM -0800, Christoph Hellwig wrote: > Thanks, this looks good. I should have add the const from the start. > > Reviewed-by: Christoph Hellwig Thanks, applying for 4.5.--b. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH] nfsd: recover: constify nfsd4_client_tracking_ops structures

2015-11-23 Thread J. Bruce Fields
On Sun, Nov 22, 2015 at 07:25:12AM -0500, Jeff Layton wrote: > On Sun, 22 Nov 2015 08:22:10 +0100 > Julia Lawall wrote: > > > The nfsd4_client_tracking_ops structures are never modified, so declare > > them as const. > > > > Done with the help of Coccinelle. > > > > Signed-off-by: Julia Lawall

Re: [PATCH v3 0/7] User namespace mount updates

2015-11-18 Thread J. Bruce Fields
On Tue, Nov 17, 2015 at 07:30:12PM +, Al Viro wrote: > On Tue, Nov 17, 2015 at 02:02:09PM -0500, Austin S Hemmelgarn wrote: > > > >_Static_ attacks, or change-image-under-mounted-fs attacks? > > To properly protect against attacks on mounted filesystems, we'd > > need some new concept of a use

[GIT PULL] nfsd changes for 4.4

2015-11-11 Thread J. Bruce Fields
open / open upgrade stateids Andrey Ryabinin (2): lockd: create NSM handles per net namespace lockd: get rid of reference-counted NSM RPC clients Arnd Bergmann (1): sunrpc: avoid warning in gss_key_timeout J. Bruce Fields (3): nfsd: fix clid_inuse on mount with security c

Re: [PATCH v15 00/22] Richacls (Core and Ext4)

2015-11-10 Thread J. Bruce Fields
On Tue, Nov 10, 2015 at 06:58:19PM +0100, Andreas Gruenbacher wrote: > On Tue, Nov 10, 2015 at 6:07 PM, J. Bruce Fields wrote: > > On Tue, Nov 10, 2015 at 10:43:46AM -0600, Steve French wrote: > >> I don't have strong disagreement with using pseudo-xattrs to > >>

Re: [PATCH v15 00/22] Richacls (Core and Ext4)

2015-11-10 Thread J. Bruce Fields
On Tue, Nov 10, 2015 at 10:43:46AM -0600, Steve French wrote: > On Tue, Nov 10, 2015 at 6:39 AM, Andreas Gruenbacher > wrote: > > On Tue, Nov 10, 2015 at 12:29 PM, Christoph Hellwig > > wrote: > >> On Mon, Nov 09, 2015 at 12:08:41PM +0100, Andreas Gruenbacher wrote: > >>> Here is another update

Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts

2015-11-02 Thread J. Bruce Fields
On Wed, Oct 28, 2015 at 07:25:10AM +0900, Neil Brown wrote: > > If you create a subvolume in btrfs and access it (by name) without > mounting it, then the subvolume looks like a separate mount to some > extent, returning a different st_dev to stat(), but it doesn't look like > a separate mount in

Re: [PATCHv2] Documentation: add new description of path-name lookup.

2015-10-27 Thread J. Bruce Fields
On Mon, Oct 26, 2015 at 03:35:54PM +0900, Neil Brown wrote: > From c38784b876a181eda9a5687e618749157dc96a0e Mon Sep 17 00:00:00 2001 > From: NeilBrown > Date: Sat, 25 Jul 2015 10:24:41 +1000 > Subject: [PATCH] Documentation: add new description of path-name lookup. > > This document is based on t

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-23 Thread J. Bruce Fields
On Fri, Oct 23, 2015 at 04:14:10AM +, Kosuke Tatsukawa wrote: > J. Bruce Fields wrote: > > On Fri, Oct 16, 2015 at 02:28:10AM +, Kosuke Tatsukawa wrote: > >> Tatsukawa Kosuke wrote: > >> > J. Bruce Fields wrote: > >> >> On Thu, Oct 15, 201

Re: [PATCH V2 0/3] Minor cleanup for locks API

2015-10-22 Thread J. Bruce Fields
On Thu, Oct 22, 2015 at 01:38:12PM -0400, Benjamin Coddington wrote: > NFS has recently been moving things around to cope with the situation where > a struct file may not be available during an unlock. That work has > presented an opportunity to do a minor cleanup on the locks API. > > Users of p

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-22 Thread J. Bruce Fields
On Fri, Oct 16, 2015 at 02:28:10AM +, Kosuke Tatsukawa wrote: > Tatsukawa Kosuke wrote: > > J. Bruce Fields wrote: > >> On Thu, Oct 15, 2015 at 11:44:20AM +, Kosuke Tatsukawa wrote: > >>> Tatsukawa Kosuke wrote: > >>> > J. Bruce Fields wrote: &

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-15 Thread J. Bruce Fields
On Thu, Oct 15, 2015 at 11:44:20AM +, Kosuke Tatsukawa wrote: > Tatsukawa Kosuke wrote: > > J. Bruce Fields wrote: > >> Thanks for the detailed investigation. > >> > >> I think it would be worth adding a comment if that might help someone > >>

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-14 Thread J. Bruce Fields
On Wed, Oct 14, 2015 at 03:57:13AM +, Kosuke Tatsukawa wrote: > J. Bruce Fields wrote: > > On Mon, Oct 12, 2015 at 10:41:06AM +, Kosuke Tatsukawa wrote: > >> J. Bruce Fields wrote: > >> > On Fri, Oct 09, 2015 at 06:29:44AM +, Kosuke Tatsukawa w

Re: [GIT PULL] more nfsd bugfixes for 4.3

2015-10-13 Thread J. Bruce Fields
Please pull two more nfsd bugfixes for 4.3 from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.3-2 Two nfsd fixes, one for an RDMA crash, one for a pnfs/block protocol bug. --b. Christoph Hellwig (1): nfsd/blocklayout: accept any minlength Chuck Lever (1): svcrdma: Fix NFS s

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-12 Thread J. Bruce Fields
On Mon, Oct 12, 2015 at 10:41:06AM +, Kosuke Tatsukawa wrote: > J. Bruce Fields wrote: > > On Fri, Oct 09, 2015 at 06:29:44AM +, Kosuke Tatsukawa wrote: > >> Neil Brown wrote: > >> > Kosuke Tatsukawa writes: > >> > > >> >> The

Re: [PATCH v2] sunrpc: fix waitqueue_active without memory barrier in sunrpc

2015-10-09 Thread J. Bruce Fields
On Fri, Oct 09, 2015 at 06:29:44AM +, Kosuke Tatsukawa wrote: > Neil Brown wrote: > > Kosuke Tatsukawa writes: > > > >> There are several places in net/sunrpc/svcsock.c which calls > >> waitqueue_active() without calling a memory barrier. Add a memory > >> barrier just as in wq_has_sleeper()

Re: [PATCH] sunrpc: avoid warning in gss_key_timeout

2015-10-09 Thread J. Bruce Fields
On Fri, Oct 09, 2015 at 04:13:45PM +0200, Arnd Bergmann wrote: > The gss_key_timeout() function causes a harmless warning in some > configurations, e.g. ARM imx_v6_v7_defconfig with gcc-5.2, if the > compiler cannot figure out the state of the 'expire' variable across > an rcu_read_unlock(): > > n

Re: [PATCH v2] lockd: get rid of reference-counted NSM RPC clients

2015-10-08 Thread J. Bruce Fields
On Wed, Oct 07, 2015 at 05:45:15PM -0400, Trond Myklebust wrote: > On Wed, Oct 7, 2015 at 7:39 AM, Andrey Ryabinin > wrote: > > Currently we have reference-counted per-net NSM RPC client > > which created on the first monitor request and destroyed > > after the last unmonitor request. It's needed

Re: [PATCH v2] lockd: get rid of reference-counted NSM RPC clients

2015-10-07 Thread J. Bruce Fields
On Wed, Oct 07, 2015 at 02:39:55PM +0300, Andrey Ryabinin wrote: > Currently we have reference-counted per-net NSM RPC client > which created on the first monitor request and destroyed > after the last unmonitor request. It's needed because > RPC client need to know 'utsname()->nodename', but utsna

[GIT PULL] nfsd bugfix for 4.3

2015-10-07 Thread J. Bruce Fields
Please pull an nfsd bugfix for 4.3 from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.3-1 Just this one RDMA fix for now.--b. Steve Wise (1): svcrdma: handle rdma read with a non-zero initial page offset net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 6 -- 1 file changed, 4 insert

Re: [PATCH] lockd: create NSM handles per net namespace

2015-10-01 Thread J. Bruce Fields
On Thu, Oct 01, 2015 at 07:36:19PM +0300, Andrey Ryabinin wrote: > On 09/29/2015 09:47 PM, J. Bruce Fields wrote: > > On Wed, Sep 23, 2015 at 03:49:29PM +0300, Andrey Ryabinin wrote: > >> Commit cb7323fffa85 ("lockd: create and use per-net NSM > >> RPC clients on

Re: [lkp] [nfsd] 4aac1bf05b: -2.9% fsmark.files_per_sec

2015-09-30 Thread J. Bruce Fields
On Thu, Oct 01, 2015 at 09:17:42AM +1000, Dave Chinner wrote: > Inode pointers have no entropy in the lower 9-10 bits because of > their size, and being allocated from a slab they are all going to > have the same set of values in the next 3-4 bits (i.e. offset into > the slab page which is defined

Re: [PATCH] lockd: create NSM handles per net namespace

2015-09-29 Thread J. Bruce Fields
On Wed, Sep 23, 2015 at 03:49:29PM +0300, Andrey Ryabinin wrote: > Commit cb7323fffa85 ("lockd: create and use per-net NSM > RPC clients on MON/UNMON requests") introduced per-net > NSM RPC clients. Unfortunately this doesn't make any sense > without per-net nsm_handle. Makes sense to me. Is any

Re: [PATCH v8 00/41] Richacls

2015-09-28 Thread J. Bruce Fields
On Mon, Sep 28, 2015 at 07:10:06PM +0200, Andreas Grünbacher wrote: > 2015-09-28 18:35 GMT+02:00 J. Bruce Fields : > > On Mon, Sep 28, 2015 at 12:08:51AM +0200, Andreas Gruenbacher wrote: > >> Open issues in nfs: > >> > >> * When a user or group name cannot be m

Re: [PATCH v8 00/41] Richacls

2015-09-28 Thread J. Bruce Fields
On Mon, Sep 28, 2015 at 12:08:51AM +0200, Andreas Gruenbacher wrote: > here's another update of the richacl patch queue. At this stage, I would > like to ask for final feedback so that the core and ext4 code (patches > 1-19) can be merged in the 4.4 merge window. The nfsd and nfs code should > th

Re: [PATCH v8 10/41] richacl: Permission check algorithm

2015-09-28 Thread J. Bruce Fields
On Mon, Sep 28, 2015 at 06:25:23PM +0200, Andreas Grünbacher wrote: > 2015-09-28 18:08 GMT+02:00 J. Bruce Fields : > > On Mon, Sep 28, 2015 at 12:09:01AM +0200, Andreas Gruenbacher wrote: > >> + /* > >> + * Check if the acl grants the requested

Re: [PATCH v8 10/41] richacl: Permission check algorithm

2015-09-28 Thread J. Bruce Fields
includes the requested permissions. > > Signed-off-by: Andreas Gruenbacher > Reviewed-by: "J. Bruce Fields" > --- > fs/Makefile | 2 +- > fs/richacl_inode.c | 148 > > include/linux/richacl.h |

Re: [PATCH v8 09/41] richacl: Update the file masks in chmod()

2015-09-28 Thread J. Bruce Fields
n. > > Signed-off-by: Andreas Gruenbacher > Reviewed-by: J. Bruce Fields > --- > fs/richacl_base.c | 40 > include/linux/richacl.h | 1 + > 2 files changed, 41 insertions(+) > > diff --git a/fs/richacl_base.c b/fs/richacl_bas

Re: [PATCH 01/19] SUNRPC: fix variable type

2015-09-25 Thread J. Bruce Fields
ACK. Assuming Trond gets this.--b. On Thu, Sep 24, 2015 at 04:00:09PM +0200, Andrzej Hajda wrote: > Due to incorrect len type bc_send_request returned always zero. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > >

Re: [RFC v7 25/41] richacl: Isolate the owner and group classes

2015-09-25 Thread J. Bruce Fields
On Fri, Sep 25, 2015 at 01:25:41PM +0200, Andreas Gruenbacher wrote: > Here is another minor improvement that produces deny aces with fewer > permissions in them and avoids creating unnecessary deny aces in some > cases. Looks good.--b. > > Andreas > > --- > fs/richacl_compat.c | 5 ++--- > 1

Re: [PATCH] richacl: Possible other write-through fix

2015-09-25 Thread J. Bruce Fields
On Fri, Sep 25, 2015 at 06:45:59PM +0200, Andreas Gruenbacher wrote: > 2015-09-24 20:33 GMT+02:00 J. Bruce Fields : > > On Sat, Sep 05, 2015 at 12:27:21PM +0200, Andreas Gruenbacher wrote: > >> +int > >> +richacl_apply_masks(struct richacl **acl, kuid_t owner) &

Re: [RFC v7 32/41] nfsd: Add support for the MAY_CREATE_{FILE,DIR} permissions

2015-09-24 Thread J. Bruce Fields
On Sat, Sep 05, 2015 at 12:27:27PM +0200, Andreas Gruenbacher wrote: > For local file systems, the vfs performs the necessary permission checks > for operations like creating files and directories. NFSd duplicates > several of those checks. The vfs checks have been extended to check for > additio

<    1   2   3   4   5   6   7   8   9   10   >