Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1878112rwd; Fri, 9 Jun 2023 03:38:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45C1XsBLgttW0bXIAo1miW8zk69KLIngo3krN8az4NmKcq6FKbu+Gycfn4XmLqsTdz5U4A X-Received: by 2002:a05:6a00:4210:b0:662:2d7a:7c68 with SMTP id cd16-20020a056a00421000b006622d7a7c68mr1102130pfb.2.1686307135205; Fri, 09 Jun 2023 03:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686307135; cv=none; d=google.com; s=arc-20160816; b=bAOo7VW+8QkFjSI2Wh+dEgA5AH6UiS8dH27F6l6sBDF6rfyDwrq4gkuVFJQoBcoleT sduLHNFAWoBe2QCV3vPoJiqUsLhCl1FPVdyDDrRo9fd6PStcDPtj3M1NMk2Lu2CbksQQ c3TJkQjE2Up1BBL4Jzh7p8B00/14JoE4FOBcuJILNCUI26wnLzQIkticIHltBT9r2jcR HDM8fr/1rvZfRM2Loah5FpSEuoWCyK+xX4hSxKujihrJ1pwUzRUtQ19SAhwd2bznbvxy HBQpU1SzdLYSssvLN17y4jEt7AiTiekNypOQO3w3BuikEn+lmBiPRiWW+gPDhd1Z+E5j nxng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pG6mXFErgEQ8ZgVFj/OVbi2iAUQF/l3Cm4NkJ83benc=; b=YD+NylcDt7r1D6+NMhBQNsO9B9PSHg8AAy2+kfZRhKKNn3bbSelSryue90M5w8puIL vpzKIQvvhUSkVFKR+IwZG+sCSqKxST5DxiDwDqW9UBIM6C1Ckh+9jTCYU3mYlhWn58K5 zgCrDuRvKHr6CynRcZvxZkNz6Bi6b+TSEQtt9irV7QxgsNXqv9VaE+ebjYi6r3p56CgU mRRK9TzAo1IdsPeWZp9mnKv19CYBet5BfV5sEZ9ePxXVUFOxLIJFPojk2Ay5CAHbzLKw iA8Cd+NjZR9ZsY6jw+zzJ50FCnzdMDd/s2VXoOI9jdkWvgVC7Gby0kDNfDw4nO8HYkMe MX8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SSAGYpmK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c22-20020a621c16000000b0065ffb3568eesi2282180pfc.208.2023.06.09.03.38.38; Fri, 09 Jun 2023 03:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SSAGYpmK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241374AbjFIKOb (ORCPT + 99 others); Fri, 9 Jun 2023 06:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239203AbjFIKNv (ORCPT ); Fri, 9 Jun 2023 06:13:51 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E974200 for ; Fri, 9 Jun 2023 03:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686304953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pG6mXFErgEQ8ZgVFj/OVbi2iAUQF/l3Cm4NkJ83benc=; b=SSAGYpmK5Xp8pxjoH/VFE5LyU6IjJEPOiAFStULG6ldf/xXHbvWeKLUstZhPjRCqvdXxDc 3eOyAWFx76vRVf8u0RZI9p6TFtqdfCpdnAiTlH0/51s5BPR0xcVK2o7X0Xu5I1tLr8cDn8 KeVOAw+d39gxK7gJL17T7ryijYfMeIg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-66-QaZulYcBM26mge84teR9Xw-1; Fri, 09 Jun 2023 06:02:30 -0400 X-MC-Unique: QaZulYcBM26mge84teR9Xw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E214880013A; Fri, 9 Jun 2023 10:02:29 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 223D9492B00; Fri, 9 Jun 2023 10:02:28 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Herbert Xu , linux-crypto@vger.kernel.org Subject: [PATCH net-next 2/6] algif: Remove hash_sendpage*() Date: Fri, 9 Jun 2023 11:02:17 +0100 Message-ID: <20230609100221.2620633-3-dhowells@redhat.com> In-Reply-To: <20230609100221.2620633-1-dhowells@redhat.com> References: <20230609100221.2620633-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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-crypto@vger.kernel.org Remove hash_sendpage*() as nothing should now call it since the rewrite of splice_to_socket()[1]. Signed-off-by: David Howells cc: Herbert Xu cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: Jens Axboe cc: Matthew Wilcox cc: linux-crypto@vger.kernel.org cc: netdev@vger.kernel.org Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=2dc334f1a63a8839b88483a3e73c0f27c9c1791c [1] --- crypto/algif_hash.c | 66 --------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 1a2d80c6c91a..dfb048cefb60 100644 --- a/crypto/algif_hash.c +++ b/crypto/algif_hash.c @@ -161,58 +161,6 @@ static int hash_sendmsg(struct socket *sock, struct msghdr *msg, goto unlock; } -static ssize_t hash_sendpage(struct socket *sock, struct page *page, - int offset, size_t size, int flags) -{ - struct sock *sk = sock->sk; - struct alg_sock *ask = alg_sk(sk); - struct hash_ctx *ctx = ask->private; - int err; - - if (flags & MSG_SENDPAGE_NOTLAST) - flags |= MSG_MORE; - - lock_sock(sk); - sg_init_table(ctx->sgl.sgl, 1); - sg_set_page(ctx->sgl.sgl, page, size, offset); - - if (!(flags & MSG_MORE)) { - err = hash_alloc_result(sk, ctx); - if (err) - goto unlock; - } else if (!ctx->more) - hash_free_result(sk, ctx); - - ahash_request_set_crypt(&ctx->req, ctx->sgl.sgl, ctx->result, size); - - if (!(flags & MSG_MORE)) { - if (ctx->more) - err = crypto_ahash_finup(&ctx->req); - else - err = crypto_ahash_digest(&ctx->req); - } else { - if (!ctx->more) { - err = crypto_ahash_init(&ctx->req); - err = crypto_wait_req(err, &ctx->wait); - if (err) - goto unlock; - } - - err = crypto_ahash_update(&ctx->req); - } - - err = crypto_wait_req(err, &ctx->wait); - if (err) - goto unlock; - - ctx->more = flags & MSG_MORE; - -unlock: - release_sock(sk); - - return err ?: size; -} - static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags) { @@ -328,7 +276,6 @@ static struct proto_ops algif_hash_ops = { .release = af_alg_release, .sendmsg = hash_sendmsg, - .sendpage = hash_sendpage, .recvmsg = hash_recvmsg, .accept = hash_accept, }; @@ -380,18 +327,6 @@ static int hash_sendmsg_nokey(struct socket *sock, struct msghdr *msg, return hash_sendmsg(sock, msg, size); } -static ssize_t hash_sendpage_nokey(struct socket *sock, struct page *page, - int offset, size_t size, int flags) -{ - int err; - - err = hash_check_key(sock); - if (err) - return err; - - return hash_sendpage(sock, page, offset, size, flags); -} - static int hash_recvmsg_nokey(struct socket *sock, struct msghdr *msg, size_t ignored, int flags) { @@ -430,7 +365,6 @@ static struct proto_ops algif_hash_ops_nokey = { .release = af_alg_release, .sendmsg = hash_sendmsg_nokey, - .sendpage = hash_sendpage_nokey, .recvmsg = hash_recvmsg_nokey, .accept = hash_accept_nokey, };