Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp279221rdb; Fri, 6 Oct 2023 03:22:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3LRimivQu2wVtbveii+SfnaWR1MEvdlpkA7S8Ku5x+kGWxS581ZcdEgKgVBmX21q4yw04 X-Received: by 2002:a05:6808:2918:b0:3ae:5e6a:46d4 with SMTP id ev24-20020a056808291800b003ae5e6a46d4mr7135728oib.37.1696587757596; Fri, 06 Oct 2023 03:22:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696587757; cv=none; d=google.com; s=arc-20160816; b=uYFnB6hU+gHDNn3SzRWlpDkPLqqdXel+web3eO204HYkbE71sjGkU8Ho5goPEZBywy u4dEnGA8ck+4KnNHg72ZcU8htX7/MfxPM2olWA+YgAaku/FddEJt23OOPMYxcDvkbF1R ttrVg+0yqs6w/5hW+4yRFwyfbXqCL1X4HOjSw7tTMw166GRQ5sSq2vWyeNaHo76fH6uk ExBGWWPNBb6JxKQNbR/s5b0Ka0ajxAZZfZ/BnfVa4GbJ3tXiVOIEijJgkVrmxCQDBio9 sjATVoqNDENFF4ORpQnf/vc950c3Y/Du27/lB1e6DbANB97vCHAUtxH/2kjbEqvMEZbj umlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=Qjbc56dQepZLkcinpxTNuUejY12ExuMUlwNUNf3fERg=; fh=C3YbTu8AgIXXCEChje7xU4BxyIsO/uHXZu0kgizT7HU=; b=AFsS33xslOIjFAUup4p61gpqkdZo0iJj3hVYClxK0IZgrKNOf05VHTwdrXV2FimG7w Oid/2b+DmK+Mzeh635ERCrAt2alPYbyPZrjZBh8GrxI+5NDwV/2duz6YUs5d+yrq7ZOb 3VgWndiPZaSIqphQCeKtqWEMIub4wuwXZc3xH7jXAFKYqNRa+LGQHcLMAvQhbNJKqgso dZ3NjBqlKL7QIePRKloG9zojQKwfJeHI2Riyih9xFkK7IO4abmmc1kCionbi6USpbwC7 RtTQeCSCCbOfITD/CXelJtLMcnYdxEoQRK4GITaM0ErDrOFxd0wyjdFa5ZV8wGOOcYOf u75A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nprbgfie; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id o24-20020a63f158000000b00578e29ae274si3294393pgk.521.2023.10.06.03.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:22:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nprbgfie; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C107D8051B71; Fri, 6 Oct 2023 03:22:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231488AbjJFKWV (ORCPT + 99 others); Fri, 6 Oct 2023 06:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbjJFKWU (ORCPT ); Fri, 6 Oct 2023 06:22:20 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA24DAD for ; Fri, 6 Oct 2023 03:22:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE955C433C8; Fri, 6 Oct 2023 10:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696587738; bh=L6PGvdYR4abq+fMSh13Uu6mxOdeChH/INMOf7Ty7orM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=NprbgfieGTdqVu7xRyvArSeOIh825Btof5RD5LoyymuI0hJHpSGAEzeHhoLP5u2Za 0kFfR0wqEBPtInrWQ16TLbJx/9XBi8lySiUriCNLcffuzYXQOWGeDFKioMGTvh5Ksy Nlxv5YqQtLGznWnI5HBbRML31+hGzSvKjSYqZi1PntBE7TV401G+n2qr5rxBFL9ozR 6C9c9M4JUaehKnGztwCC4RtBby7ODEr8I5vzRsNbEQ9bKzKR8RQHghNr+mntSmKH7F uClyKgVpWZyFYZzh6GwLM3XddYCKPZOKaGtGRR5lycN6NuEb9htA9UTCK0LE0AWGAf PaXud1jRTRRhA== Message-ID: <935f32e3fe9daf234ff547de1efa2bdcdfa6288e.camel@kernel.org> Subject: Re: [PATCH v4 1/1] nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op From: Jeff Layton To: Dai Ngo , anna@kernel.org Cc: trondmy@hammerspace.com, linux-nfs@vger.kernel.org Date: Fri, 06 Oct 2023 06:22:16 -0400 In-Reply-To: <1695105020-5886-1-git-send-email-dai.ngo@oracle.com> References: <1695105020-5886-1-git-send-email-dai.ngo@oracle.com> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 03:22:23 -0700 (PDT) X-Spam-Level: ** On Mon, 2023-09-18 at 23:30 -0700, Dai Ngo wrote: > The Linux NFS server strips the SUID and SGID from the file mode > on ALLOCATE op. >=20 > Modify _nfs42_proc_fallocate to add NFS_INO_REVAL_FORCED to > nfs_set_cache_invalid's argument to force update of the file > mode suid/sgid bit. >=20 > Suggested-by: Trond Myklebust > Signed-off-by: Dai Ngo > Reviewed-by: Jeff Layton > --- > v3 -> v4: add Suggested-by and Reviewed-by tag. >=20 > fs/nfs/nfs42proc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c > index 63802d195556..9d2f07feeb29 100644 > --- a/fs/nfs/nfs42proc.c > +++ b/fs/nfs/nfs42proc.c > @@ -81,7 +81,8 @@ static int _nfs42_proc_fallocate(struct rpc_message *ms= g, struct file *filep, > if (status =3D=3D 0) { > if (nfs_should_remove_suid(inode)) { > spin_lock(&inode->i_lock); > - nfs_set_cache_invalid(inode, NFS_INO_INVALID_MODE); > + nfs_set_cache_invalid(inode, > + NFS_INO_REVAL_FORCED | NFS_INO_INVALID_MODE); > spin_unlock(&inode->i_lock); > } > status =3D nfs_post_op_update_inode_force_wcc(inode, This fixes generic/683 and generic/684 for me, when nfsd has issued a write delegation. This was posted some time ago. Is there some reason this hasn't been merged yet? Tested-by: Jeff Layton