From patchwork Fri Jun 9 10:02:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13273616 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32D19C7EE2E for ; Fri, 9 Jun 2023 10:02:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28EEB8E0006; Fri, 9 Jun 2023 06:02:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 21BAB8E0001; Fri, 9 Jun 2023 06:02:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08EDE8E0007; Fri, 9 Jun 2023 06:02:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D1AF08E0001 for ; Fri, 9 Jun 2023 06:02:37 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 9C942801C3 for ; Fri, 9 Jun 2023 10:02:37 +0000 (UTC) X-FDA: 80882769954.15.499C166 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf21.hostedemail.com (Postfix) with ESMTP id A6E841C0028 for ; Fri, 9 Jun 2023 10:02:34 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dhbiso+s; spf=pass (imf21.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686304954; a=rsa-sha256; cv=none; b=H/6r9+TO230AKief9fwPjv5fGjbbTGGyDmvFY3STnMG0Sbee591L/rRQGiYaVsU905Kzet BulTwlL69RP+oZOPNHHFhMmMUt6P9bHa33bVTDRhX0kmSur5x495YjPRMWd4FH+/Y8vnc0 U7G2V+OpTH7GZwnh1zBOwdewUEGnxKw= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dhbiso+s; spf=pass (imf21.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686304954; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pG6mXFErgEQ8ZgVFj/OVbi2iAUQF/l3Cm4NkJ83benc=; b=dYqnPKTtXmh4WpSo8DzlAjXK0lYWjCG1CEWdX6hKygvKirAGnGlCRNnKDseM2H81wFNY78 kyjKFQu4ONLPdv4Ifm70UTSNl/s8C1CIOpdSIVDH4mfVxuo/zW3cyXvBUBtxGTGTrmx82H kw3G2He9LXdFUPFxbbfrbsjX7tJlW4Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686304954; 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=dhbiso+slD0fjsIU0ns7h3Chk+9Z4O4FuYon6YJokNw5Vg9v62jFR2b30xQwvIjMdJlsFH G8q15cxYA3UgoukpWcQHGKd8Ikjxw9iOHFX+7OQkXHyMju2G3/o/2r4Emx/A2JScZbRUXr 8pIYEwsYvyh+rIC2r1HMJ4M8EeUexh0= 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 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: A6E841C0028 X-Stat-Signature: o7uy9ijpu8w6h1b4wt9kusfx456m76pu X-Rspam-User: X-HE-Tag: 1686304954-220950 X-HE-Meta: U2FsdGVkX18N3AxUp8QI1RO0wjwi4q2yCgJ2Wga+q318YpTaUtnG+z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ex+xcD5dJspM72bWM2iyYlrtt6J/JowuvYKdJWgmIrTbVgO0/k3CwIQdhJyqCkI8txoPgPIzT07LLeAFed48FYN/khku2tRoRabjakT65VtMM1IhU0lZ50Sn5FsOZGZbMddMyc+8eXIDvIHi0VpGy/qrGlrgHjUl2W11LDobUackj+PXJHLBBATVjubJWRSyj1ceYNhY8E4AIpqklEj4z8AnjQVPP2r0lrtNtz6WdFKXSwDEcOqBaSk+YpYpm8rleJRUKHU9hX4FlY8q1vEmyhTtphxggjtRJ8uNwpDbijX13yK8XkNV1B5oFClNwY/HQsfPUjE4HprVmN7gU6cwkeaLYnyLm5Lf3AkcAvYpg3Pzjjuq7L3azH6CvXcXQLnapg1utfzqu1V2rLEXbn7LVuRc/e4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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, };