Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2693728iof; Wed, 8 Jun 2022 10:04:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygOWXaBmOKNM1EGRnO7iknHtKwr7RaEUMUuPvyLdtkVfhR2rY1nulyjiwiOmhqm+B6HU5o X-Received: by 2002:a62:f90b:0:b0:51b:5836:ee91 with SMTP id o11-20020a62f90b000000b0051b5836ee91mr35338655pfh.51.1654707840952; Wed, 08 Jun 2022 10:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654707840; cv=none; d=google.com; s=arc-20160816; b=LLal8pMvxA/Y9BcUV/L4oxRy+piWXm4aIvLoShAOquUQwJRX/9VQvDdrz7X/rEB7DO apWWDGArIHtKlpiyEAyLurFro4pWT/OYj9jw1GYW0u7xwLNa9xN1Zk/2BoGc6XLXtM53 uIP+/oYT+JwQ0fyOs+E5pBmdns/GQFPuHr35N+UZHHpek9wohjJmS6CgRDlNwzhrPYk/ SPyvv0oZQxYWC4rY3/9zc6fJLcK+ekVM61+3wXE3FaTaYHFGZIltByH5haJbq/GGPHhk UGFUuZGcSlzvr/+yq83htqT8KkRiy8sbII5EItWIZG1tDyhsMm4bJWhOgWAcheWBOO/2 X1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date :dkim-signature:dkim-filter; bh=8S3HTXBWO3QW//HmwJ7oUwEBQgX4Pv2PumuMSl+vvbA=; b=ev7A07LxtQVs7QvFrk+yb0nwUNQGmq1mct908dMqysrkQn44jkg26RGTNWAmg9AqOt wrxftjJXCl/V6GOjYB5HVprPnoUPTNwLGtJL6yce2nKXySg+KeqnQBJPGMp+8qbr7bgF oJw4369sLCo385ErY+2gPApok4IOsGMIdvwF+mdWSPNyGk5eSzJunWcHU5K1JhJDT8f2 m/AMHidL7KH9b51Ig1kCFlUSUQCMEGSisX/HSry4hfw75lnaxgwd+1yxvcT3wew7MJ/W uj7ENmmqwPx7AjDJfD775cItPOwN5rjEwmxMlHfDFeYZEXtrxk4HEL7sn1ZTsV+06jMU ivDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=LbrbvurT; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k63-20020a638442000000b003fcb9d205ecsi28626469pgd.200.2022.06.08.10.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:04:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=LbrbvurT; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE08D2EBF09; Wed, 8 Jun 2022 09:32:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245158AbiFHQcT (ORCPT + 99 others); Wed, 8 Jun 2022 12:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343497AbiFHQcG (ORCPT ); Wed, 8 Jun 2022 12:32:06 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2ACF2C2783 for ; Wed, 8 Jun 2022 09:31:31 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 64770712B; Wed, 8 Jun 2022 12:31:30 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 64770712B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1654705890; bh=8S3HTXBWO3QW//HmwJ7oUwEBQgX4Pv2PumuMSl+vvbA=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=LbrbvurTIa+tmT7Yo6bpj112Dcxuu+tI9QFLfbPuX/hX+98tzC8kMfkL69z6s6X9L /6ctAZyeaPKrbAmJsNJA1ZPLy+x/xY37ACd9M/SNbcKIeTlvgjZP/LDOaNCpx+XhWw Pa+MfYCd43s0iMqB/sC2m0Ghg6XKARUWxMYPPTaY= Date: Wed, 8 Jun 2022 12:31:30 -0400 To: Chuck Lever Cc: linux-nfs@vger.kernel.org, trondmy@hammerspace.com, anna.schumaker@netapp.com Subject: Re: [PATCH v2 0/5] Fix NFSv3 READDIRPLUS failures Message-ID: <20220608163130.GB16378@fieldses.org> References: <165463444560.38298.18296069287423675496.stgit@bazille.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <165463444560.38298.18296069287423675496.stgit@bazille.1015granger.net> User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Looks good. Feel free to add my reviewed-by:. Do we have a test that reads a large enough directory? Seems like that plus the right kernel debugging options should have caught the original bug. --b. On Tue, Jun 07, 2022 at 04:47:45PM -0400, Chuck Lever wrote: > NFSD's new READDIRPLUS dirent encoder blows past the end of the > directory payload xdr_stream when the client requests more than a > page worth of directory entries. I tracked this down to how > xdr_get_next_encode_buffer() computes xdr->end. First patch in this > series is the fix. The remaining patches are clean-ups and > optimizations. > > I want to get this series into 5.19-rc quickly. I would appreciate > getting one more R-b for this series, preferrably from one of the > NFS client maintainers. > > > Changes since v1: > - Adjusted patch 2/5 per Neil Brown's suggestion > - Series applied to my NFS client and tested there > > --- > > Chuck Lever (5): > SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer() > SUNRPC: Optimize xdr_reserve_space() > SUNRPC: Clean up xdr_commit_encode() > SUNRPC: Clean up xdr_get_next_encode_buffer() > SUNRPC: Remove pointer type casts from xdr_get_next_encode_buffer() > > > include/linux/sunrpc/xdr.h | 16 +++++++++++++++- > net/sunrpc/xdr.c | 37 +++++++++++++++++++++++-------------- > 2 files changed, 38 insertions(+), 15 deletions(-) > > -- > Chuck Lever