From patchwork Sun Apr 27 00:42:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 885364 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F51C1DFF0 for ; Sun, 27 Apr 2025 00:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745714577; cv=none; b=AHpmVJd99NtRS2m1t5T3seqIVrpJpW0yDbylNKBnoZ0taH9rMd01PYwOX0BiD4JKg+8Qen8RGYh9M6lBEK4hKZKqV0oi1b2txmUyUlaNdfRfBS+rHsY2qZvRZyAZvFww+fKlemFZpW4FFL8Aa9IhGAOH78AFWVjnMu8hmPhXl/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745714577; c=relaxed/simple; bh=9zAETYT4rPVWfyQprqBoWOw9BDK4bRypzOVvZKQQUw4=; h=Date:Message-Id:From:Subject:To; b=pF+O8yR2l2Y3NTPPN9e2eyxzxCZPXM9kIEZ6M4KwTaLwd/am3+Ek2rN6HPLZ1o+szcGMdiCjHHRGk7pQsPlUgPqkxDWVdNqFYAIC6n68tlKvJCwC6mEeMkZveeuDyKE71D7iLCAan7cyEGasuRozvK3xNFv22/IWZhd6KYvsMuM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b=WsZk7fwS; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b="WsZk7fwS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hmeau.com; s=formenos; h=To:Subject:From:Message-Id:Date:Sender:Reply-To:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=16J4SUGwX+h1riZfP0MC9mN3hl0KcBQNQ4swWWI93c4=; b=WsZk7fwSlYKhKeeuT3TjW9vmfa +AT4fhv8ydGj4aKW4PLUvAz8nbazkrve3kIjkK6VEhR6iOxGkbQjh3HkE28mrKmaMGqEQ7I+C4wST 5+CXs8i/8oF/a5CtI5KeqKfNIr7+UO6URM2tbYFpqTtQ85VEX61jsvPEphOa/QfUts5uPHKPfl8kP l4Hq/PxItvbcY31BkQhIiA3tcceOvCOU6s7lw+ys84DMC1pukAT4XLxt1/u3JqMnKbtaDWnYoZqR1 0bsjE/Vkr+Ifsagpz+UDauMacQjkY2QKFHA6+MgRuCyObq/5+7QAs04IqHhfryWgmxqx3RAZDwBfB f/C3Rn7Q==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1u8q6b-001J9M-23; Sun, 27 Apr 2025 08:42:50 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sun, 27 Apr 2025 08:42:49 +0800 Date: Sun, 27 Apr 2025 08:42:49 +0800 Message-Id: From: Herbert Xu Subject: [PATCH 0/2] crypto: Make memcpy_sglist usable for Crypto API To: Linux Crypto Mailing List Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: I added memcpy_sglist for the simple SG lists used by zswap. It is quite similar in terms functionality to the skcipher_null algorithm. However, before memcpy_sglist can replace skcipher_null, it needs to handle funky SG lists generated by IPsec. The SG lists are distinct, but contain identical subsets. This patch series adds this functionality to memcpy_sglist by remodelling it on top of skcipher_walk instead of scatterwalk. As a prerequisite, skcipher_walk has been abstracted out of skcipher and moved into scatterwalk. Herbert Xu (2): crypto: ccp - Include crypto/utils.h for crypto_memneq crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist crypto/scatterwalk.c | 274 +++++++++++++++++++++++++++-- crypto/skcipher.c | 261 +-------------------------- drivers/crypto/ccp/ccp-ops.c | 11 +- include/crypto/algapi.h | 12 -- include/crypto/internal/skcipher.h | 48 +---- include/crypto/scatterwalk.h | 65 ++++++- 6 files changed, 335 insertions(+), 336 deletions(-) base-commit: 432f98cf56cf1e0f812f79a713847b37ae86cf31