From patchwork Fri Nov 17 22:14:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13459753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01D12C072A2 for ; Fri, 17 Nov 2023 22:14:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231905AbjKQWOc (ORCPT ); Fri, 17 Nov 2023 17:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjKQWOb (ORCPT ); Fri, 17 Nov 2023 17:14:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1AF0D4E for ; Fri, 17 Nov 2023 14:14:28 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70889C433CA for ; Fri, 17 Nov 2023 22:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700259268; bh=/jy2dlNVtF45gHuw2giQPnbKbbI+95WgTArDmH6adxQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=oSSdhWUr1o5gZGhGTZfhODMzomIYdvKgnUCnl0LTKvw+BBx6AVBzKHU9zMXS6h1C3 dmX+CD0ZqDFvS5dWy9vsR/8nU75C9aUmj5PeAskoTt9faFValTptCX4ApsdmA/nj17 HfrfzCCk2+3bsIKOb7ZSexD/Cu5n9MmYiorkZH6y5qhZIxBdNjFAG+nltokrXcQ7Va 14/V7mWkJjfIOm0qJDjldK00Ms0ZRSq3QiF8M7F2Bokd3IVoP7CAOtbTt0/d3TZQda TvqARajRWm502jcoLNegc/la5iuhFHGVkMGXV6fJau005K/ybp7jXP866o+WOEJm0I NpjBLCH5PkBOA== Subject: [PATCH v2 1/4] SUNRPC: Add a server-side API for retrieving an RPC's pseudoflavor From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Fri, 17 Nov 2023 17:14:27 -0500 Message-ID: <170025926738.4577.11486458886663210137.stgit@bazille.1015granger.net> In-Reply-To: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> References: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever NFSD will use this new API to determine whether nfsd_splice_read is safe to use. This avoids the need to add a dependency to NFSD for CONFIG_SUNRPC_GSS. Signed-off-by: Chuck Lever --- include/linux/sunrpc/svcauth.h | 7 ++++++- net/sunrpc/auth_gss/svcauth_gss.c | 6 ++++++ net/sunrpc/svcauth.c | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 6f90203edbf8..61c455f1e1f5 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h @@ -131,8 +131,11 @@ enum svc_auth_status { * This call releases a domain. * * set_client() - * Givens a pending request (struct svc_rqst), finds and assigns + * Given a pending request (struct svc_rqst), finds and assigns * an appropriate 'auth_domain' as the client. + * + * pseudoflavor() + * Returns RPC_AUTH pseudoflavor in use by @rqstp. */ struct auth_ops { char * name; @@ -143,11 +146,13 @@ struct auth_ops { int (*release)(struct svc_rqst *rqstp); void (*domain_release)(struct auth_domain *dom); enum svc_auth_status (*set_client)(struct svc_rqst *rqstp); + rpc_authflavor_t (*pseudoflavor)(struct svc_rqst *rqstp); }; struct svc_xprt; extern enum svc_auth_status svc_authenticate(struct svc_rqst *rqstp); +extern rpc_authflavor_t svc_auth_flavor(struct svc_rqst *rqstp); extern int svc_authorise(struct svc_rqst *rqstp); extern enum svc_auth_status svc_set_client(struct svc_rqst *rqstp); extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 18734e70c5dd..104d9a320142 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -2014,6 +2014,11 @@ svcauth_gss_domain_release(struct auth_domain *dom) call_rcu(&dom->rcu_head, svcauth_gss_domain_release_rcu); } +static rpc_authflavor_t svcauth_gss_pseudoflavor(struct svc_rqst *rqstp) +{ + return svcauth_gss_flavor(rqstp->rq_gssclient); +} + static struct auth_ops svcauthops_gss = { .name = "rpcsec_gss", .owner = THIS_MODULE, @@ -2022,6 +2027,7 @@ static struct auth_ops svcauthops_gss = { .release = svcauth_gss_release, .domain_release = svcauth_gss_domain_release, .set_client = svcauth_gss_set_client, + .pseudoflavor = svcauth_gss_pseudoflavor, }; static int rsi_cache_create_net(struct net *net) diff --git a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c index aa4429d0b810..1619211f0960 100644 --- a/net/sunrpc/svcauth.c +++ b/net/sunrpc/svcauth.c @@ -160,6 +160,22 @@ svc_auth_unregister(rpc_authflavor_t flavor) } EXPORT_SYMBOL_GPL(svc_auth_unregister); +/** + * svc_auth_flavor - return RPC transaction's RPC_AUTH flavor + * @rqstp: RPC transaction context + * + * Returns an RPC flavor or GSS pseudoflavor. + */ +rpc_authflavor_t svc_auth_flavor(struct svc_rqst *rqstp) +{ + struct auth_ops *aops = rqstp->rq_authop; + + if (!aops->pseudoflavor) + return aops->flavour; + return aops->pseudoflavor(rqstp); +} +EXPORT_SYMBOL_GPL(svc_auth_flavor); + /************************************************** * 'auth_domains' are stored in a hash table indexed by name. * When the last reference to an 'auth_domain' is dropped, From patchwork Fri Nov 17 22:14:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13459754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAA27C54FB9 for ; Fri, 17 Nov 2023 22:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232831AbjKQWOj (ORCPT ); Fri, 17 Nov 2023 17:14:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjKQWOi (ORCPT ); Fri, 17 Nov 2023 17:14:38 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32554D4F for ; Fri, 17 Nov 2023 14:14:35 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3AE6C433C7 for ; Fri, 17 Nov 2023 22:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700259274; bh=sup+iVZdIKvY0XQV8mPGWpmDXOHzD3LXdW+eKrvhZUc=; h=Subject:From:To:Date:In-Reply-To:References:From; b=OyE5bZCX0Jgbmh+tCvAF66pY63j7ZJbDacYiIH4F5lo/GMzzGIZdY1Lywhyh1dgAG 7Rwf8qSzBFVIo1WeL7tsPHLoHRdy1Non4MOYO9TX/q+RfOufqrYr7uvzOyURZoaeFN LS5XD3JoFJYCrFRZDi1ApMdfJQPLEJkCxatcxBxWrYTkbbgd5oa8LWAFlxV20vu56j Uh1q0bPU8sZDCtcoNNy0Kd3vkeGHJshQFmVfjG2zEg4xuYYMlcIdIGp4dDYePx/UaT +3wTx0SUCdJQ7og5XQe7goFR7Hx4TAE8d+A5lIj66BFAqC7HPrsrqgtcXamNnjUGDR XG1gbTGkMpkbA== Subject: [PATCH v2 2/4] NFSD: Replace RQ_SPLICE_OK in nfsd_read() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Fri, 17 Nov 2023 17:14:33 -0500 Message-ID: <170025927377.4577.15971872542273069502.stgit@bazille.1015granger.net> In-Reply-To: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> References: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever RQ_SPLICE_OK is a bit of a layering violation. Also, a subsequent patch is going to provide a mechanism for always disabling splice reads. Splicing is an issue only for NFS READs, so refactor nfsd_read() to check the auth type directly instead of relying on an rq_flag setting. The new helper will be added into the NFSv4 read path in a subsequent patch. Signed-off-by: Chuck Lever --- fs/nfsd/vfs.c | 26 +++++++++++++++++++++++++- fs/nfsd/vfs.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index fbbea7498f02..0ea7f533f816 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1216,6 +1216,30 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, return nfserr; } +/** + * nfsd_read_splice_ok - check if spliced reading is supported + * @rqstp: RPC transaction context + * + * Return values: + * %true: nfsd_splice_read() may be used + * %false: nfsd_splice_read() must not be used + * + * NFS READ normally uses splice to send data in-place. However the + * data in cache can change after the reply's MIC is computed but + * before the RPC reply is sent. To prevent the client from + * rejecting the server-computed MIC in this somewhat rare case, do + * not use splice with the GSS integrity and privacy services. + */ +bool nfsd_read_splice_ok(struct svc_rqst *rqstp) +{ + switch (svc_auth_flavor(rqstp)) { + case RPC_AUTH_GSS_KRB5I: + case RPC_AUTH_GSS_KRB5P: + return false; + } + return true; +} + /** * nfsd_read - Read data from a file * @rqstp: RPC transaction context @@ -1245,7 +1269,7 @@ __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, return err; file = nf->nf_file; - if (file->f_op->splice_read && test_bit(RQ_SPLICE_OK, &rqstp->rq_flags)) + if (file->f_op->splice_read && nfsd_read_splice_ok(rqstp)) err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof); else err = nfsd_iter_read(rqstp, fhp, file, offset, count, 0, eof); diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h index e3c29596f4df..702fbc4483bf 100644 --- a/fs/nfsd/vfs.h +++ b/fs/nfsd/vfs.h @@ -114,6 +114,7 @@ __be32 nfsd_iter_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, unsigned long *count, unsigned int base, u32 *eof); +bool nfsd_read_splice_ok(struct svc_rqst *rqstp); __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, unsigned long *count, u32 *eof); From patchwork Fri Nov 17 22:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13459755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F58DC5ACB3 for ; Fri, 17 Nov 2023 22:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233195AbjKQWOq (ORCPT ); Fri, 17 Nov 2023 17:14:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbjKQWOp (ORCPT ); Fri, 17 Nov 2023 17:14:45 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89764D51 for ; Fri, 17 Nov 2023 14:14:41 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1627DC433C7 for ; Fri, 17 Nov 2023 22:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700259281; bh=Rp9TVcpXba2368iPXgufI/Nj9Hri4vnuWp5nRa9Nt4o=; h=Subject:From:To:Date:In-Reply-To:References:From; b=HgcTCuUDqyTJ5bFgZ0TGkEIPG6qNnptBS6YxyiAFd1Fj2/QQeAdUqV0iiHLxo4iAP tUcpIWkBahm28woIUTkSnoK7FyoxFbfnGQoAgS/kxgvaUXRU5EYnhxTBS2l19DKqQ6 Hpsf2Pc+H3QGK9Eq0Deif1JRNLBPU9evVD7FtB2hkWKm/lrZo5b+3uTtgfB84Kd0sw xqEJw4P7vVyHmDVtwxK6h3Yv4/BgJ9XW1Is4VW5S+yqfhDZMw9ZlFz6DfzDpCe9hUe GfqUg2wKkaVCxmzghQX0JZyDbFo2tl40byp4Oksmqt1KwxxMLXPiOePVQ5X3irN/6j XZK6gPIHd7zQQ== Subject: [PATCH v2 3/4] NFSD: Modify NFSv4 to use nfsd_read_splice_ok() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Fri, 17 Nov 2023 17:14:40 -0500 Message-ID: <170025928004.4577.15734797736094788262.stgit@bazille.1015granger.net> In-Reply-To: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> References: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever Avoid the use of an atomic bitop, and prepare for adding a run-time switch for using splice reads. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4proc.c | 7 +++++-- fs/nfsd/nfs4xdr.c | 13 ++++++++----- fs/nfsd/xdr4.h | 1 + 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 6f2d4aa4970d..14712fa08f76 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -970,8 +970,11 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, * To ensure proper ordering, we therefore turn off zero copy if * the client wants us to do more in this compound: */ - if (!nfsd4_last_compound_op(rqstp)) - clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); + if (!nfsd4_last_compound_op(rqstp)) { + struct nfsd4_compoundargs *argp = rqstp->rq_argp; + + argp->splice_ok = false; + } /* check stateid */ status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index ec4ed6206df1..ea7c8e32d3ba 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2524,8 +2524,9 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) svc_reserve(argp->rqstp, max_reply + readbytes); argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; + argp->splice_ok = nfsd_read_splice_ok(argp->rqstp); if (readcount > 1 || max_reply > PAGE_SIZE - auth_slack) - clear_bit(RQ_SPLICE_OK, &argp->rqstp->rq_flags); + argp->splice_ok = false; return true; } @@ -4378,12 +4379,13 @@ static __be32 nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, union nfsd4_op_u *u) { + struct nfsd4_compoundargs *argp = resp->rqstp->rq_argp; struct nfsd4_read *read = &u->read; - bool splice_ok = test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags); - unsigned long maxcount; struct xdr_stream *xdr = resp->xdr; - struct file *file; int starting_len = xdr->buf->len; + bool splice_ok = argp->splice_ok; + unsigned long maxcount; + struct file *file; __be32 *p; if (nfserr) @@ -5204,9 +5206,10 @@ static __be32 nfsd4_encode_read_plus_data(struct nfsd4_compoundres *resp, struct nfsd4_read *read) { - bool splice_ok = test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags); + struct nfsd4_compoundargs *argp = resp->rqstp->rq_argp; struct file *file = read->rd_nf->nf_file; struct xdr_stream *xdr = resp->xdr; + bool splice_ok = argp->splice_ok; unsigned long maxcount; __be32 nfserr, *p; diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h index 80e859dc84d8..415516c1b27e 100644 --- a/fs/nfsd/xdr4.h +++ b/fs/nfsd/xdr4.h @@ -840,6 +840,7 @@ struct nfsd4_compoundargs { u32 minorversion; u32 client_opcnt; u32 opcnt; + bool splice_ok; struct nfsd4_op *ops; struct nfsd4_op iops[8]; }; From patchwork Fri Nov 17 22:14:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13459756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4A65C54FB9 for ; Fri, 17 Nov 2023 22:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233844AbjKQWOv (ORCPT ); Fri, 17 Nov 2023 17:14:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232628AbjKQWOv (ORCPT ); Fri, 17 Nov 2023 17:14:51 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31BCD4E for ; Fri, 17 Nov 2023 14:14:47 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7132FC433C8 for ; Fri, 17 Nov 2023 22:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700259287; bh=9oe8uXCu9s6YhWdGkxYpeJvuS+hFH9+8s2vul0ErwoA=; h=Subject:From:To:Date:In-Reply-To:References:From; b=s5t9kyKSsmEd4H1xyGDWQr3AgUWILwL0dCHjHjZl964c5lkv18eD9yb9rODC8LqiE 1OL7eLxUuMeYKz5ojU3HVXPBp2R0Ie5+V/Jdd0rkJksJMy3eJqi8sFSynFix5ymt3L 1y/Y3zhoDZWX+NbBRGjqzW9T9qpmsNDNCwV5PLhKIFoeZZVAY1ARAepNNNcgLnpBsT zCgDp91oTUgomodPNgJXCWLCEdxv1EgD35e0udxAYUWbAEVmo2WpRywBanRZbBf4aB 0wQhcrC8sZfTGKLrOOyzJFEkc/WhbxjCmZ5T2i/G8JvRr6rKfR/Zz4HJ4aFsc4GXG5 4ehTaExiPkhXQ== Subject: [PATCH v2 4/4] SUNRPC: Remove RQ_SPLICE_OK From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Fri, 17 Nov 2023 17:14:46 -0500 Message-ID: <170025928643.4577.11219746525309912238.stgit@bazille.1015granger.net> In-Reply-To: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> References: <170025895725.4577.18051288602708688381.stgit@bazille.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Chuck Lever This flag is no longer used. Signed-off-by: Chuck Lever --- include/linux/sunrpc/svc.h | 2 -- include/trace/events/sunrpc.h | 1 - net/sunrpc/auth_gss/svcauth_gss.c | 10 ---------- net/sunrpc/svc.c | 2 -- 4 files changed, 15 deletions(-) diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index b10f987509cc..544fcfe07479 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -260,8 +260,6 @@ enum { RQ_LOCAL, /* local request */ RQ_USEDEFERRAL, /* use deferral */ RQ_DROPME, /* drop current reply */ - RQ_SPLICE_OK, /* turned off in gss privacy to prevent - * encrypting page cache pages */ RQ_VICTIM, /* Have agreed to shut down */ RQ_DATA, /* request has data */ }; diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 337c90787fb1..cdd3a45e6003 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -1675,7 +1675,6 @@ DEFINE_SVCXDRBUF_EVENT(sendto); svc_rqst_flag(LOCAL) \ svc_rqst_flag(USEDEFERRAL) \ svc_rqst_flag(DROPME) \ - svc_rqst_flag(SPLICE_OK) \ svc_rqst_flag(VICTIM) \ svc_rqst_flag_end(DATA) diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 104d9a320142..24de94184700 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -866,14 +866,6 @@ svcauth_gss_unwrap_integ(struct svc_rqst *rqstp, u32 seq, struct gss_ctx *ctx) struct xdr_buf databody_integ; struct xdr_netobj checksum; - /* NFS READ normally uses splice to send data in-place. However - * the data in cache can change after the reply's MIC is computed - * but before the RPC reply is sent. To prevent the client from - * rejecting the server-computed MIC in this somewhat rare case, - * do not use splice with the GSS integrity service. - */ - clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); - /* Did we already verify the signature on the original pass through? */ if (rqstp->rq_deferred) return 0; @@ -948,8 +940,6 @@ svcauth_gss_unwrap_priv(struct svc_rqst *rqstp, u32 seq, struct gss_ctx *ctx) struct xdr_buf *buf = xdr->buf; unsigned int saved_len; - clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); - if (xdr_stream_decode_u32(xdr, &len) < 0) goto unwrap_failed; if (rqstp->rq_deferred) { diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 3f2ea7a0496f..fa4e23fa0e09 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1305,8 +1305,6 @@ svc_process_common(struct svc_rqst *rqstp) int rc; __be32 *p; - /* Will be turned off by GSS integrity and privacy services */ - set_bit(RQ_SPLICE_OK, &rqstp->rq_flags); /* Will be turned off only when NFSv4 Sessions are used */ set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); clear_bit(RQ_DROPME, &rqstp->rq_flags);