Re: [PATCH] net: sunrpc: xprt.c: fix shift-out-of-bounds in xprt_calc_majortimeo

2021-04-19 Thread Trond Myklebust
_retries; > if (majortimeo > to->to_maxval || majortimeo == 0) I've already stated on the mailing list that I'm not accepting any changes to xprt_calc_majortimeo() for this problem. There is a fix to the NFS mount code that addresses this bounds issue, and that commit is already being tested in linux-next. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-08 Thread Trond Myklebust
On Thu, 2021-04-08 at 11:24 -0400, Olga Kornievskaia wrote: > On Thu, Apr 8, 2021 at 11:01 AM Trond Myklebust < > tron...@hammerspace.com> wrote: > > > > On Tue, 2021-04-06 at 19:16 -0500, Aditya Pakki wrote: > > > In gss_pipe_destroy_msg(), in case of er

Re: [PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-08 Thread Trond Myklebust
 static void gss_pipe_dentry_destroy(struct dentry *dir, NACK. There's no double free there. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH] NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds

2021-03-16 Thread Trond Myklebust
return an error. > > > > Fixes: 9954bf92c0cd ("NFS: Move mount parameterisation bits into > > their own file") > > Reported-by: syzbot+ba2e91df8f7480941...@syzkaller.appspotmail.com > > Reported-by: syzbot+f3a0fa110fd630ab5...@syzkaller.appspotm

Re: [PATCH] net: sunrpc: fixed function and extra line coding styles

2021-03-16 Thread Trond Myklebust
ed, > @@ -566,6 +557,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, > struct auth_cred * acred, >     cred->cr_ops->cr_init != NULL && >     !(flags & RPCAUTH_LOOKUP_NEW)) { > int res = cred->cr_ops->cr_init(auth, cred); > + > if (res < 0) { > put_rpccred(cred); > cred = ERR_PTR(res); NACK. This is not consistent with the preferred style for NFS and SUNRPC (or the preferred style in Documentation/process/coding- style.rst). -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-15 Thread Trond Myklebust
On Mon, 2021-02-15 at 19:24 +0200, Amir Goldstein wrote: > On Mon, Feb 15, 2021 at 6:53 PM Trond Myklebust < > tron...@hammerspace.com> wrote: > > > > On Mon, 2021-02-15 at 18:34 +0200, Amir Goldstein wrote: > > > On Mon, Feb 15, 2021 at 5:42 PM Luis Hen

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-15 Thread Trond Myklebust
ap about this tracefs corner case and why it can't be fixed. There are plenty of reasons why copy offload across filesystems makes sense, and particularly when you're doing NAS. Clone just doesn't cut it when it comes to disaster recovery (whereas backup to a different storage unit does). If the client h

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-15 Thread Trond Myklebust
he copy process being used (i.e. do_splice_direct()). Does sendfile() also 'issue' in the same way? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: UBSAN: shift-out-of-bounds in xprt_do_reserve

2021-02-10 Thread Trond Myklebust
t options produces garbage timeout values. However, more importantly, it is a case where we could easily be checking these values once at mount time instead of adding runtime checks that can end up being called several times per RPC call. Cheers Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH AUTOSEL 5.10 03/45] SUNRPC: Handle TCP socket sends with kernel_sendpage() again

2021-02-08 Thread Trond Myklebust
On Mon, 2021-02-08 at 19:48 +, Chuck Lever wrote: > > > > On Feb 8, 2021, at 2:34 PM, Trond Myklebust < > > tron...@hammerspace.com> wrote: > > > > On Tue, 2021-01-19 at 20:25 -0500, Sasha Levin wrote: > > > From

Re: [PATCH AUTOSEL 5.10 03/45] SUNRPC: Handle TCP socket sends with kernel_sendpage() again

2021-02-08 Thread Trond Myklebust
ing to push a slab page into kernel_sendpage(). What guarantees that the nfsd thread won't call kfree() before the socket layer is done transmitting the page? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [GIT PULL] Please pull NFS client bugfixes for 5.11

2021-01-31 Thread Trond Myklebust
On Sun, 2021-01-31 at 11:22 -0800, Linus Torvalds wrote: > On Sun, Jan 31, 2021 at 8:59 AM Trond Myklebust < > tron...@hammerspace.com> wrote: > > > >   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git tags/nfs- > > for-5.11-3 > > Merged. However, it l

Re: rpc_xprt_debugfs_register() - atomic_inc_return() usage

2021-01-21 Thread Trond Myklebust
s, with that uniqueness condition actually being enforced by the subsequent debugfs_create_file() call. IOW: I don't think this is a real problem. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client bugfixes

2021-01-12 Thread Trond Myklebust
in trace_event_raw_event_nfs4_set_lock Scott Mayhew (1): NFS: Adjust fs_context error logging Trond Myklebust (9): pNFS: Mark layout for return if return-on-close was not sent pNFS: We want return-on-close to complete when evicting the inode pNFS: Clean up

Re: linux-next: Fixes tag needs some work in the nfs tree

2021-01-10 Thread Trond Myklebust
ion to fs_context.") > > has these problem(s): > >   - No SHA1 recognised > > See duplicate "Fixes: " :-( > Sorry, that was my fault. I added the 'Fixes' tag when I applied the patch. and failed to notice the copy-paste error. I'll fix up the commit chan

Re: NFS 4.2 client support broken on 5.10.5

2021-01-08 Thread Trond Myklebust
n or off in .config? It really is not safe to enable READ_PLUS on 5.10 kernels since that can cause random memory corruption. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [GIT PULL] Please pull NFS client changes for 5.11

2020-12-17 Thread Trond Myklebust
On Thu, 2020-12-17 at 12:25 -0800, Linus Torvalds wrote: > On Thu, Dec 17, 2020 at 10:05 AM Trond Myklebust > wrote: > > > >   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git tags/nfs- > > for- > > 5.11-1 > > > > for you to fetch changes up to &g

[GIT PULL] Please pull NFS client changes for 5.11

2020-12-17 Thread Trond Myklebust
: NFSv2/NFSv3: Use cred from fs_context during mount NFSv4: Refactor to use user namespaces for nfs4idmap Trond Myklebust (63): NFSv3: Refactor nfs3_proc_lookup() to split out the dentry NFSv3: Add emulation of the lookupp() operation NFSv4: Observe the NFS_MOUNT_SOFTREVAL flag

Re: linux-next: manual merge of the nfs tree with Linus' tree

2020-12-14 Thread Trond Myklebust
ient side READ_PLUS code ended up being a little more extensive than hoped for in the last week of the 2.10 cycle, hence the need for a Kconfig option to disable it. Apologies for the extra work it caused you. Cheers Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH] NFS: remove trailing semicolon in macro definition

2020-11-29 Thread Trond Myklebust
On Sun, 2020-11-29 at 16:42 +, Trond Myklebust wrote: > Hi Tom, > > On Fri, 2020-11-27 at 11:43 -0800, t...@redhat.com wrote: > > From: Tom Rix > > > > The macro use will already have a semicolon. > > > > Signed-off-by: Tom Rix > > --- >

Re: [PATCH] NFS: remove trailing semicolon in macro definition

2020-11-29 Thread Trond Myklebust
127 bytes.  This assumption is not inherent > in There is exactly 1 use of this macro in the code AFAICS. Can we please just get rid of it, and make the code trivially easier to read? Thanks Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH] NFS: Retry the CLOSE if the embedded GETATTR is rejected with ERR_STALE

2020-11-18 Thread Trond Myklebust
On Wed, 2020-11-18 at 21:29 +, Anchal Agarwal wrote: > On Wed, Nov 18, 2020 at 03:17:20AM +0000, Trond Myklebust wrote: > > CAUTION: This email originated from outside of the organization. Do > > not click links or open attachments unless you can confirm the > > sender

Re: [PATCH] NFS: Retry the CLOSE if the embedded GETATTR is rejected with ERR_STALE

2020-11-17 Thread Trond Myklebust
oducible if running against nfsd. That would be a seriously broken server. If you return NFS4ERR_STALE to the client, you cannot expect any further interaction with that file from the client. It won't try to send CLOSE or DELEGRETURN or any other stateful operation. -- Trond Myklebust

Re: [PATCH] NFS: only invalidate dentrys that are clearly invalid.

2020-11-15 Thread Trond Myklebust
On Mon, 2020-11-16 at 16:12 +1100, NeilBrown wrote: > On Mon, Nov 16 2020, Trond Myklebust wrote: > > > On Mon, 2020-11-16 at 16:00 +1100, NeilBrown wrote: > > > On Mon, Nov 16 2020, Trond Myklebust wrote: > > > > > > > On Mon, 2020-11-16 at 15:43 +1100,

Re: [PATCH] NFS: only invalidate dentrys that are clearly invalid.

2020-11-15 Thread Trond Myklebust
On Mon, 2020-11-16 at 16:00 +1100, NeilBrown wrote: > On Mon, Nov 16 2020, Trond Myklebust wrote: > > > On Mon, 2020-11-16 at 15:43 +1100, NeilBrown wrote: > > > On Mon, Nov 16 2020, Trond Myklebust wrote: > > > > > > > On Mon,

Re: [PATCH] NFS: only invalidate dentrys that are clearly invalid.

2020-11-15 Thread Trond Myklebust
On Mon, 2020-11-16 at 15:43 +1100, NeilBrown wrote: > On Mon, Nov 16 2020, Trond Myklebust wrote: > > > On Mon, 2020-11-16 at 13:59 +1100, NeilBrown wrote: > > > > > > Prior to commit 5ceb9d7fdaaf ("NFS: Refactor > > > nfs_lookup_revalidate()&qu

Re: [PATCH] NFS: only invalidate dentrys that are clearly invalid.

2020-11-15 Thread Trond Myklebust
r, dentry, inode, error); Which errors do we actually need to return here? As far as I can tell, the only errors that nfs_lookup_verify_inode() is supposed to return is ENOMEM, ESTALE, ECHILD, and possibly EIO or ETiMEDOUT. Why would it be better to return those errors rather than just a 0 when we

Re: [PATCH v4 0/2] NFS: Fix interaction between fs_context and user namespaces

2020-11-11 Thread Trond Myklebust
On Wed, 2020-11-11 at 18:57 +, Sargun Dhillon wrote: > On Wed, Nov 11, 2020 at 02:38:11PM +0000, Trond Myklebust wrote: > > On Wed, 2020-11-11 at 11:12 +, Sargun Dhillon wrote: > > > On Tue, Nov 10, 2020 at 08:12:01PM +0000, Trond Myklebust wrote: > > > > On

Re: [PATCH v4 0/2] NFS: Fix interaction between fs_context and user namespaces

2020-11-11 Thread Trond Myklebust
On Wed, 2020-11-11 at 11:12 +, Sargun Dhillon wrote: > On Tue, Nov 10, 2020 at 08:12:01PM +0000, Trond Myklebust wrote: > > On Tue, 2020-11-10 at 17:43 +0100, Alban Crequy wrote: > > > Hi, > > > > > > I tested the patches on top of 5.10.0-rc3+ and I

Re: [PATCH v4 0/2] NFS: Fix interaction between fs_context and user namespaces

2020-11-10 Thread Trond Myklebust
u will now get the exact same behaviour as if you do that with any other filesystem. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH rfc] workqueue: honour cond_resched() more effectively.

2020-11-09 Thread Trond Myklebust
On Mon, 2020-11-09 at 09:01 -0500, t...@kernel.org wrote: > Hello, > > On Mon, Nov 09, 2020 at 01:50:40PM +0000, Trond Myklebust wrote: > > > I'm thinking the real problem is that you're abusing workqueues. > > > Just > > > don't stuff so much work

Re: [PATCH rfc] workqueue: honour cond_resched() more effectively.

2020-11-09 Thread Trond Myklebust
using workqueues. Just > don't stuff so much work into it that this becomes a problem. Or > rather, > if you do, don't lie to it about it. If we can't use workqueues to call iput_final() on an inode, then what is the point of having them at all? Neil's use case is simply a file that has managed to accumulate a seriously large page cache, and is therefore taking a long time to complete the call to truncate_inode_pages_final(). Are you saying we have to allocate a dedicated thread for every case where this happens? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH 2/2] NFS: Limit the number of retries

2020-11-02 Thread Trond Myklebust
   if (err != -NFS4ERR_DELAY) > +   if (err != -NFS4ERR_DELAY || retry == 0) > break; > ssleep(1); > +   --retry; > } while (1); > return nfs4_handle_delegation_recall_error(server, state, > state

Re: [PATCH] NFS: Fix mode bits and nlink count for v4 referral dirs

2020-10-15 Thread Trond Myklebust
On Thu, 2020-10-15 at 09:36 -0400, Chuck Lever wrote: > > On Oct 15, 2020, at 8:06 AM, Trond Myklebust < > > tron...@hammerspace.com> wrote: > > > > On Thu, 2020-10-15 at 00:39 +0530, Ashish Sangwan wrote: > > > On Wed, Oct 14, 2020 at 11:47 PM Trond Mykle

Re: [PATCH] NFS: Fix mode bits and nlink count for v4 referral dirs

2020-10-15 Thread Trond Myklebust
On Thu, 2020-10-15 at 00:39 +0530, Ashish Sangwan wrote: > On Wed, Oct 14, 2020 at 11:47 PM Trond Myklebust > wrote: > > On Tue, 2020-10-06 at 08:14 -0700, Ashish Sangwan wrote: > > > Request for mode bits and nlink count in the nfs4_get_referral > > > call > &

Re: [PATCH] NFS: Fix mode bits and nlink count for v4 referral dirs

2020-10-14 Thread Trond Myklebust
fattr->mode |= S_IFDIR; > + > + if (fix_nlink) > + fattr->nlink = 2; > } > > static int _nfs4_proc_fs_locations(struct rpc_clnt *client, struct > inode *dir, NACK to this patch. The whole point is that if the server has a referral, then it i

[GIT PULL] Please pull NFS client bugfixes

2020-09-28 Thread Trond Myklebust
Mitchell (1): nfs: Fix security label length not being reset Olga Kornievskaia (1): NFSv4.2: fix client's attribute cache management for copy_file_range Trond Myklebust (2): pNFS/flexfiles: Ensure we initialise the mirror bsizes correctly on read pNFS/flexfiles

[GIT PULL] Please pull NFS client bugfixes for Linux 5.9

2020-09-09 Thread Trond Myklebust
first return delegation J. Bruce Fields (1): SUNRPC: stop printk reading past end of string Olga Kornievskaia (1): NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall Trond Myklebust (1): Merge tag 'nfs-rdma-for-5.9-1' of git://git.linux-nfs.org

[GIT PULL] Please pull NFS client updates for Linux 5.9

2020-08-14 Thread Trond Myklebust
on connection reset Randy Dunlap (1): fs: nfs: delete repeated words in comments Scott Mayhew (2): nfs: ensure correct writeback errors are returned on close() nfs: nfs_file_write() should check for writeback errors Trond Myklebust (11): NFS: Allow applications to speed

Re: [PATCH] nfs: Fix getxattr kernel panic and memory overflow

2020-08-11 Thread Trond Myklebust
GE; > + if (label->len) > + memcpy(label->label, p, len); Just a heads up that I fixed this to avoid the duplicate test of label- >len != 0 and I added a Fixes: before applying. > label-&

Re: [PATCH] nfs: pnfs: use GFP_ATOMIC under spin lock

2020-06-29 Thread Trond Myklebust
fs_find_alloc_layout(ino, ctx, GFP_KERNEL); > + lo = pnfs_find_alloc_layout(ino, ctx, GFP_ATOMIC); > if (!lo) > goto out_unlock; > if (!test_bit(NFS_LAYOUT_INVALID_STID, >plh_flags)) NACK. Please read the code before sending yet another one of these pointless p

Re: [PATCH 05/12] mm: support async buffered reads in generic_file_buffered_read()

2020-05-24 Thread Trond Myklebust
On Sun, 2020-05-24 at 10:40 -0600, Jens Axboe wrote: > On 5/24/20 10:30 AM, Jens Axboe wrote: > > On 5/24/20 8:05 AM, Trond Myklebust wrote: > > > On Sat, 2020-05-23 at 12:57 -0600, Jens Axboe wrote: > > > > Use the async page locking infras

Re: [PATCH 05/12] mm: support async buffered reads in generic_file_buffered_read()

2020-05-24 Thread Trond Myklebust
iocb->ki_flags & IOCB_WAITQ) > + error = lock_page_async(page, iocb->private); > + else > + error = lock_page_killable(page); > if (unlikely(error)) > goto readpage_error; > -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client bugfixes

2020-05-15 Thread Trond Myklebust
_do NeilBrown (1): SUNRPC: fix use-after-free in rpc_free_client_work() Olga Kornievskaia (1): NFSv3: fix rpc receive buffer size for MOUNT call Trond Myklebust (3): Merge tag 'fscache-fixes-20200508-2' of git://git.kernel.org/.../dhowells/linux-fs NFS: Don't use RPC_TASK_CRED_NO

Re: [PATCH -next] nfs: fsinfo: fix build when CONFIG_NFS_V4 is not enabled

2020-05-15 Thread Trond Myklebust
4_WORD0_HIDDEN) || > ^~ > ../fs/nfs/fsinfo.c:209:13: error: 'const struct nfs_server' has no > member named 'attr_bitmask' > (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) > ^~ > > > Signed-off-by: Randy Dunlap > Cc: linux-...@vger.ker

Re: linux-next: Tree for May 15 (nfs/fsinfo.c)

2020-05-15 Thread Trond Myklebust
On Fri, 2020-05-15 at 16:32 +, Trond Myklebust wrote: > Hi Randy, > > On Fri, 2020-05-15 at 08:28 -0700, Randy Dunlap wrote: > > On 5/15/20 5:42 AM, Stephen Rothwell wrote: > > > Hi all, > > &

Re: linux-next: Tree for May 15 (nfs/fsinfo.c)

2020-05-15 Thread Trond Myklebust
member named ‘attr_bitmask’ > (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) > ^~ > > Full randconfig file is attached. > Where is this file coming from? I'm not aware of any fs/nfs/fsinfo.c in the current tree or in my linux-next for 5.7, and a cursory glance is showing it up in Anna's linux-next for the 5.8 merge window. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH 0/5] cachefiles, nfs: Fixes

2020-05-10 Thread Trond Myklebust
-- > fs/nfs/fscache.c | 39 ++- > fs/nfs/super.c | 1 - > 3 files changed, 24 insertions(+), 28 deletions(-) > I can pull this branch, and send it together with the NFS client bugfixes for 5.7-rc5. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client bugfixes

2020-05-02 Thread Trond Myklebust
, absent} NeilBrown (1): SUNRPC: defer slow parts of rpc_free_client() to a workqueue. Olga Kornievskaia (1): NFSv4.1: fix handling of backchannel binding in BIND_CONN_TO_SESSION Trond Myklebust (4): NFS/pnfs: Ensure that _pnfs_return_layout() waits for layoutreturn completion

Re: [PATCH 0/4] allow multiple kthreadd's

2020-05-01 Thread Trond Myklebust
g kthread_data(current). > > I do expect to expose a delegation interface for userspace servers > eventually too. But we could do the tgid check for them and still > use > kthread_data() for nfsd. That might work. > > --b. > -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: About patch NFS: Fix O_DIRECT accounting of number of bytes read/written

2019-10-15 Thread Trond Myklebust
if the problem exists in other local fs such as > xfs,ext4? > There is no VFS locking that enforces any serialisation for O_DIRECT. So unless the filesystem implements its own serialisation (which xfs does) then there is no guarantee. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH] NFS: Fix O_DIRECT read problem when another write is going on

2019-09-30 Thread Trond Myklebust
n just EOF. I think we also need to look at the generic error handling, and ensure that it handles a truncated RPC call in the middle of a series of calls correctly. Please see the two patches I sent you just now and check if they fix the problem for you. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: PROBLEM: nfs? crash in Linux 5.3 (possible regression)

2019-09-24 Thread Trond Myklebust
On Tue, 2019-09-24 at 13:55 -0400, Nick Bowler wrote: > On 9/20/19, Nick Bowler wrote: > > On 9/20/19, Trond Myklebust wrote: > > > On Fri, 2019-09-20 at 14:23 -0400, Nick Bowler wrote: > > > > Not sure how reproducible this is. Since I've never seen a > >

Re: PROBLEM: nfs? crash in Linux 5.3 (possible regression)

2019-09-20 Thread Trond Myklebust
edf0 R15: > a1433ffeff00 > [ 796.130493] FS: () GS:a1434048() > knlGS: > [ 796.132923] CS: 0010 DS: ES: CR0: 80050033 > [ 796.135266] CR2: 0014 CR3: 000747ce6000 CR4: > 003406e0 > > Thanks, > Nick -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: Regression in 5.1.20: Reading long directory fails

2019-09-12 Thread Trond Myklebust
cting to, since we're actually moving the last 'n' bytes in the message in order to be able to read them. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: Regression in 5.1.20: Reading long directory fails

2019-09-12 Thread Trond Myklebust
On Thu, 2019-09-12 at 09:08 -0400, Benjamin Coddington wrote: > On 12 Sep 2019, at 8:53, Trond Myklebust wrote: > > Let's please just scrap this function and rewrite it as a generic > > function for reading the MIC. It clearly is not a generic function > > for > >

Re: Regression in 5.1.20: Reading long directory fails

2019-09-12 Thread Trond Myklebust
o point to it; > otherwise > - * try to find space for it at the end of the tail, copy it there, > and > - * set obj to point to it. */ > + * try to find space for it at the end of the tail, and copy it > there. > If > + * the netobj is partly within the page data and tail, shrink the > pages > to > + * move the object into the tail */ > int xdr_buf_read_netobj(struct xdr_buf *buf, struct xdr_netobj > *obj, > unsigned int offset) > { > struct xdr_buf subbuf; > + unsigned int page_range; > > if (xdr_decode_word(buf, offset, >len)) > return -EFAULT; > + > + page_range = buf->head->iov_len + buf->page_len - offset + 4; > + if (page_range > 0 && page_range < obj->len) > + xdr_shrink_pagelen(buf, page_range); > + > if (xdr_buf_subsegment(buf, , offset + 4, obj->len)) > return -EFAULT; > > Let's please just scrap this function and rewrite it as a generic function for reading the MIC. It clearly is not a generic function for reading arbitrary netobjs, and modifications like the above just make the misnomer painfully obvious. Let's rewrite it as xdr_buf_read_mic() so that we can simplify it where possible. Thanks Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [PATCH v3 16/26] NFS: Move mount parameterisation bits into their own file

2019-09-11 Thread Trond Myklebust
On Wed, 2019-09-11 at 14:24 -0400, Chuck Lever wrote: > > On Sep 11, 2019, at 12:16 PM, Scott Mayhew > > wrote: > > > > From: David Howells > > > > Split various bits relating to mount parameterisation out from > > fs/nfs/super.c into their own file to form the basis of filesystem > > context

[PATCH v2 1/2] NFS: Fix inode fileid checks in attribute revalidation code

2019-09-10 Thread Trond Myklebust
Signed-off-by: Trond Myklebust Signed-off-by: Christophe Leroy --- fs/nfs/inode.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index c764cfe456e5..2a03bfeec10a 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1403,11 +1403,12

Re: Regression in 5.1.20: Reading long directory fails

2019-09-08 Thread Trond Myklebust
On Sun, 2019-09-08 at 11:48 -0400, Chuck Lever wrote: > > On Sep 8, 2019, at 11:19 AM, Trond Myklebust < > > tron...@hammerspace.com> wrote: > > > > On Sun, 2019-09-08 at 07:39 -0400, Benjamin Coddington wrote: > > > On 6 Sep 2019, at 16:50, Chuck Lever

Re: Regression in 5.1.20: Reading long directory fails

2019-09-08 Thread Trond Myklebust
gt; readdir -- but I need to check the RFCs. Anyone know if v4 READDIR > results > have to be aligned? > > Also need to check just why krb5i is the only auth that cares.. > I'm not seeing that. If you look at commit 02ef04e432ba, you'll see that Chuck did add a 'padding term' to decode_readdir_maxsz in the NFSv4 case. The other thing to remember is that a readdir 'dirlist4' entry is always word aligned (irrespective of the length of the filename), so there is no padding that needs to be taken into account. I think we probably rather want to look at how auth->au_ralign is being calculated for the case of krb5i. I'm really not understanding why auth->au_ralign should not take into account the presence of the mic. Chuck? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS bugfix

2019-09-04 Thread Trond Myklebust
for Linux 5.3 Highlights include: Bugfixes: - Fix inode fileid checks in attribute revalidation code Trond Myklebust (1): NFS: Fix inode fileid checks in attribute revalidation code fs/nfs/inode.c | 18 ++ 1 file

Re: [PATCH 4.19 35/98] NFS: Fix regression whereby fscache errors are appearing on nofsc mounts

2019-08-28 Thread Trond Myklebust
|| > > + (data->options & NFS_OPTION_FSCACHE) != (nfss->options & > > NFS_OPTION_FSCACHE) || > > data->nfs_server.port != nfss->port || > > data->nfs_server.addrlen != nfss->nfs_client->cl_addrlen || > > !rpc_cmp_addr((struct sockaddr *)>nfs_server.address, -- Trond Myklebust CTO, Hammerspace Inc 4300 El Camino Real, Suite 105 Los Altos, CA 94022 www.hammer.space

[GIT PULL] Please pull NFS client bugfixes

2019-08-27 Thread Trond Myklebust
rors twice. -------- Trond Myklebust (17): NFS: Don't refresh attributes with mounted-on-file information NFSv4: Fix return values for nfs4_file_open() NFSv4: Fix return value in nfs_finish_open() NFSv4/pnfs: Fix a page

Re: Linux-next-20190823: x86_64/i386: prot_hsymlinks.c:325: Failed to run cmd: useradd hsym

2019-08-27 Thread Trond Myklebust
t; result->verf->committed = NFS_FILE_SYNC; Thanks! I've moved the above to nfs_write_done() so that we do it only on success (see http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=3ba5688da709dd0f7d917029c206bc1848a6ae74 ) -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: Linux-next-20190823: x86_64/i386: prot_hsymlinks.c:325: Failed to run cmd: useradd hsym

2019-08-26 Thread Trond Myklebust
> > > I'd suggest something like the following to fix it up: > > No change with that patch, > but following one fixes it for me: > > diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c > index 20b3717cd7ca..56cefa0ab804 100644 > --- a/fs/nfs/pagelist.c > +++ b/fs/

Re: Linux-next-20190823: x86_64/i386: prot_hsymlinks.c:325: Failed to run cmd: useradd hsym

2019-08-26 Thread Trond Myklebust
The only thing I can think of that might cause an EIO on NFSv2 would be this patch http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=627d48e597ec5993c4abb3b81dc75e554a07c7c0 assuming that a bind-related error is leaking through. I'd suggest something like the following to fix i

Re: nfs4 server stops responding

2019-08-19 Thread Trond Myklebust
> /proc/561/stack-[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 > > > In dmesg of second VM sometimes nfs complaints are seen: > > [ 386.362897] nfs: server xyz not responding, still trying > > Any ideas what's going wrong here...? > The 'server not responding' implies that there is a network connection issue. Does 'netstat -nt | grep :2049' show a correctly established TCP connection between the client and server VMs? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client bugfixes

2019-08-08 Thread Trond Myklebust
server connection times out Trond Myklebust (12): NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid NFSv4: Fix delegation state recovery NFSv4: Print an error in the syslog when state is marked

[GIT PULL] Please pull NFS changes for Linux 5.3

2019-07-18 Thread Trond Myklebust
state management on a single connection. SUNRPC: enhance rpc_clnt_show_stats() to report on all xprts. SUNRPC: add links for all client xprts to debugfs Trond Myklebust (36): NFSv4: Handle open for execute correctly NFSv4: Handle the special Linux file open access mode SUNRPC: R

Re: [PATCH] Revert "NFS: readdirplus optimization by cache mechanism" (memleak)

2019-07-12 Thread Trond Myklebust
gt; > But for now I have decided to just revert the commit, because the > > real > > fix would require complex considerations, risking more dangerous > > (crash) bugs, which may seem unsuitable for the stable branches. > > > > Signed-off-by: Max Kellermann > > --- > > fs/nfs/dir.c | 90 --- > > > > fs/nfs/internal.h | 3 +- > > 2 files changed, 7 insertions(+), 86 deletions(-) > > No cc: stable@vger on this patch to get it backported? > I've added one. I've also backed out the 3 fixes for other problems with the same patch that were in the linux-next tree. (St. Stephen Rothwell please forgive me, for I have sinned...) -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: linux-next: Signed-off-by missing for commits in the nfs tree

2019-07-09 Thread Trond Myklebust
Yes please. On Tue, 9 Jul 2019 at 10:30, Schumaker, Anna wrote: > > On Sun, 2019-07-07 at 17:30 -0400, Trond Myklebust wrote: > > NetApp Security WARNING: This is an external email. Do not click > > links or open attachments unless you recognize the sender and know >

Re: linux-next: Signed-off-by missing for commits in the nfs tree

2019-07-07 Thread Trond Myklebust
On Sun, 7 Jul 2019 at 17:29, Stephen Rothwell wrote: > > Hi all, > > Commits > > fe9ad197bd8a ("xprtrdma: Remove the RPCRDMA_REQ_F_PENDING flag") > 08d720bcd822 ("xprtrdma: Fix occasional transport deadlock") > beb843739ea0 ("xprtrdma: Replace use of xdr_stream_pos in >

Re: [REGRESSION v5.2-rc] SUNRPC: Declare RPC timers as TIMER_DEFERRABLE (431235818bc3)

2019-06-05 Thread Trond Myklebust
47] nfs: server 192.168.99.1 not responding, still trying > > [ 105.484809] nfs: server 192.168.99.1 OK > > [ 105.486454] nfs: server 192.168.99.1 OK > > > So it would appear that making these timers deferrable is having an > impact > when resuming from suspend. Do you have any thoughts on this? > I'd be OK with just reverting this patch if it is causing a performance issue. Anna? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [LKP] [SUNRPC] 0472e47660: fsmark.app_overhead 16.0% regression

2019-05-30 Thread Trond Myklebust
On Thu, 2019-05-30 at 15:20 +0800, Xing Zhengjun wrote: > > On 5/30/2019 10:00 AM, Trond Myklebust wrote: > > Hi Xing, > > > > On Thu, 2019-05-30 at 09:35 +0800, Xing Zhengjun wrote: > > > Hi Trond, > > > > > > On 5/20/2019

Re: [LKP] [SUNRPC] 0472e47660: fsmark.app_overhead 16.0% regression

2019-05-29 Thread Trond Myklebust
Hi Xing, On Thu, 2019-05-30 at 09:35 +0800, Xing Zhengjun wrote: > Hi Trond, > > On 5/20/2019 1:54 PM, kernel test robot wrote: > > Greeting, > > > > FYI, we noticed a 16.0% improvement of fsmark.app_overhead due to > > commit: > > > > > > commit: 0472e476604998c127f3c80d291113e77c5676ac

Re: PROBLEM: oops spew with Linux 5.1.5 (NFS regression?)

2019-05-29 Thread Trond Myklebust
m it after rpc_check_timeout(). Reported-by: Olga Kornievskaia Reported-by: Nick Bowler Fixes: cea57789e408 ("SUNRPC: Clean up") Cc: sta...@vger.kernel.org # v5.1+ Signed-off-by: Trond Myklebust --- net/sunrpc/clnt.c | 28 ++-- 1 file changed, 14 insertions(+),

[GIT PULL] Please pull 1 NFS client bugfix

2019-04-20 Thread Trond Myklebust
in which an RPC call can be tagged with an error despite the transmission being successful Trond Myklebust (1): SUNRPC: Ignore queue transmission errors on successful transmission net/sunrpc/clnt.c | 7 +-- 1 file changed, 5

[GIT PULL] Please pull NFS client bugfixes

2019-04-13 Thread Trond Myklebust
vector xprtrdma: Fix helper that drains the transport Olga Kornievskaia (1): NFSv4.1 fix incorrect return value in copy_file_range Tetsuo Handa (1): NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family. Trond Myklebust (1): Revert "SUNRPC: Micro-optim

Re: 5.1.0-rc4: Oops in __rpc_execute() when trying to boot from NFS

2019-04-12 Thread Trond Myklebust
On Fri, 2019-04-12 at 07:57 +0200, Daniel Mack wrote: > Hi Trond, > > On 11/4/2019 9:50 PM, Trond Myklebust wrote: > > Could you please try pulling the 'testing' branch from > > http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=shortlog;h=refs/heads/testing > &

Re: 5.1.0-rc4: Oops in __rpc_execute() when trying to boot from NFS

2019-04-11 Thread Trond Myklebust
Hi Daniel, On Tue, 2019-04-09 at 19:54 +0200, Daniel Mack wrote: > On 9/4/2019 6:55 PM, Trond Myklebust wrote: > > On Tue, 2019-04-09 at 18:25 +0200, Daniel Mack wrote: > > > On 8/4/2019 8:51 PM, Trond Myklebust wrote: > > > > On Mon, 2019-04-08 at 19:01 +0200, D

Re: linux-next: Tree for Apr 9

2019-04-09 Thread Trond Myklebust
port_acl_version': > fs/nfsd/nfssvc.c:145:14: error: 'NFSD_ACL_MINVERS' undeclared > > and similar. Build failures and (many ? most ? all ?) of the qemu > failures > are due to commit 55d4c716ea ("nfsd: Add custom rpcbind callbacks for > knfsd"). An updated patch set that fixes this issue was sent out earlier today. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: 5.1.0-rc4: Oops in __rpc_execute() when trying to boot from NFS

2019-04-09 Thread Trond Myklebust
On Tue, 2019-04-09 at 18:25 +0200, Daniel Mack wrote: > On 8/4/2019 8:51 PM, Trond Myklebust wrote: > > On Mon, 2019-04-08 at 19:01 +0200, Daniel Mack wrote: > > > Hi, > > > > > > I'm seeing the Oops below when trying to boot 5.1.0-rc4 on an ARM > >

Re: 5.1.0-rc4: Oops in __rpc_execute() when trying to boot from NFS

2019-04-08 Thread Trond Myklebust
I could bisect the issue if that helps. > Please do bisect if that is at all practical. I'm having trouble interpreting this Oops. Thanks! Trond -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client fixes

2019-03-26 Thread Trond Myklebust
Kornievskaia (1): NFSv4.1 don't free interrupted slot on open Trond Myklebust (3): SUNRPC: Don't let RPC_SOFTCONN tasks time out if the transport is connected NFS: Fix a typo in nfs_init_timeout_values() pNFS/flexfiles: Fix layoutstats handling during read failovers fs/lockd

Re: [PATCH] NFS: Fix nfs4_lock_state refcounting in nfs4_alloc_{lock,unlock}data()

2019-03-18 Thread Trond Myklebust
tx); > @@ -6526,7 +6525,6 @@ static struct nfs4_lockdata > *nfs4_alloc_lockdata(struct file_lock *fl, > p->res.lock_seqid = p->arg.lock_seqid; > p->lsp = lsp; > p->server = server; > - refcount_inc(>ls_count); > p->ctx = get_nfs_open_context(ctx); > locks_init_lock(>fl); > locks_copy_lock(>fl, fl); Thanks Catalin! Good catch... I'm applying this to my linux-next branch. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

[GIT PULL] Please pull NFS client bugfixes for 5.1

2019-03-16 Thread Trond Myklebust
() Cleanups: - Remove redundant check for the reply length in call_decode() Olga Kornievskaia (1): fix null pointer deref in tracepoints in back channel Trond Myklebust (7): pNFS: Fix a typo in pnfs_update_layout

[GIT PULL] Please pull NFS client updates for Linux 5.1

2019-03-12 Thread Trond Myklebust
ption of page being written pNFS: Avoid read/modify/write when it is not necessary NeilBrown (1): SUNRPC: remove pointless test in unx_match() Trond Myklebust (58): NFS: Fix I/O request leakages NFS: Fix an I/O request leakage in nfs_do_recoalesce NFS: Don't recoal

Re: Regression: SUNRPC: Use poll() to fix up the socket requeue races

2019-02-26 Thread Trond Myklebust
On Tue, 2019-02-26 at 10:33 -0800, Tony Lindgren wrote: > Hi, > > * Trond Myklebust [700101 00:00]: > > On Mon, 2019-02-25 at 22:27 +, Jon Hunter wrote: > > > On 25/02/2019 21:03, Trond Myklebust wrote: > > > This is nfsroot. I don't specify any particular N

Re: Regression: SUNRPC: Use poll() to fix up the socket requeue races

2019-02-25 Thread Trond Myklebust
On Mon, 2019-02-25 at 22:27 +, Jon Hunter wrote: > On 25/02/2019 21:03, Trond Myklebust wrote: > > On Mon, 2019-02-25 at 20:25 +, Jon Hunter wrote: > > > Hi Trond, > > > > > > Starting in next-20190222 I have observed a regression with NFS > >

Re: Regression: SUNRPC: Use poll() to fix up the socket requeue races

2019-02-25 Thread Trond Myklebust
On Mon, 2019-02-25 at 20:25 +, Jon Hunter wrote: > Hi Trond, > > Starting in next-20190222 I have observed a regression with NFS > causing > some of our boards to fail to boot. Bisect points to your commit ... > > commit 0ffe86f48026b7f34db22d1004bc9992f0db8b33 >

Re: [PATCH 15/20] NFS: drop useless LIST_HEAD

2019-02-21 Thread Trond Myklebust
{ > struct nfs4_ds_server *dss; > - LIST_HEAD(shutdown_list); > > while (!list_empty(>cl_ds_clients)) { > dss = list_entry(clp->cl_ds_clients.next, > Thanks Julia! Applied to my linux-next branch for inclusion in the 5.1 merge window. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-20 Thread Trond Myklebust
On Tue, 2019-02-19 at 23:03 +, David Howells wrote: > Trond Myklebust wrote: > > > Do we really need a new system call to set up containers? That > > would > > force changes to all existing orchestration software. > > No, it wouldn't. Nothing in my patches

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-17 Thread Trond Myklebust
e any reason why a syscall to allow an appropriately privileged process to add a keyring-specific message queue to its own user_namespace and obtain a file descriptor to that message queue might not work? That forces the container to use a daemon if it cares to intercept keyring traffic, rather than worrying about the kernel running request_key (in fact, it might make sense to allow a trivial implementation of the daemon to be to just read the messages, parse them and run request_key). With such an implementation, the fallback mechanism could be to walk back up the hierarchy of user_namespaces until a message queue is found, and to invoke the existing request_key mechanism if not. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com

Re: [GIT PULL] Please pull NFS client updates for 4.21

2019-01-02 Thread Trond Myklebust
ferent namespace then unprivileged userspace processes might be able to manipulate the mapping to spoof the identities of privileged users or groups, or otherwise gain access to files to which they normally should not have access. Does that argument make sense? -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.mykleb...@hammerspace.com signature.asc Description: This is a digitally signed message part

[GIT PULL] Please pull NFS client bugfixes

2018-12-19 Thread Trond Myklebust
it does not mask errors that should be handled by call_connect_status() Trond Myklebust (3): SUNRPC: Fix disconnection races SUNRPC: Fix a race with XPRT_CONNECTING SUNRPC: Remove xprt_connect_status() net/sunrpc

Re: NFS/TCP crashes on MIPS/RBTX4927 in v4.20-rcX (bisected)

2018-12-17 Thread Trond Myklebust
On Mon, 2018-12-17 at 19:55 +0100, Geert Uytterhoeven wrote: > Hi Trond, > > (For the newly added CCs, first message was > https://lore.kernel.org/lkml/CAMuHMdVJr0PwvJg3FeTCy7vxuyY1=s1tplho7hpsozx4wz+...@mail.gmail.com/) > > > On Mon, Dec 17, 2018 at 3:51 PM Trond

Re: NFS/TCP crashes on MIPS/RBTX4927 in v4.20-rcX (bisected)

2018-12-17 Thread Trond Myklebust
Hi Geert, On Mon, 2018-12-17 at 15:03 +0100, Geert Uytterhoeven wrote: > Hi Trond, > > On Wed, Dec 5, 2018 at 3:47 PM Geert Uytterhoeven < > ge...@linux-m68k.org> wrote: > > On Wed, Dec 5, 2018 at 2:45 PM Trond Myklebust < > > tron...@hammerspace.com> wrot

[GIT PULL] Please pull NFS client changes

2018-12-06 Thread Trond Myklebust
Chuck Lever (1): SUNRPC: Fix leak of krb5p encode pages Dave Kleikamp (1): nfs: don't dirty kernel pages read by direct-io Tigran Mkrtchyan (1): flexfiles: enforce per-mirror stateid only for v4 DSes Trond Myklebust (9): SUNRPC: call_connect_status

[GIT PULL] Please pull NFS client changes

2018-12-06 Thread Trond Myklebust
Chuck Lever (1): SUNRPC: Fix leak of krb5p encode pages Dave Kleikamp (1): nfs: don't dirty kernel pages read by direct-io Tigran Mkrtchyan (1): flexfiles: enforce per-mirror stateid only for v4 DSes Trond Myklebust (9): SUNRPC: call_connect_status

  1   2   3   4   5   6   7   8   9   10   >