From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796483283; b=hOM4SVD0AdpoYitQqYgJJg1/ACgPF0UKiLkoT1hiOo4Qlb+ePXD+80mMVcW7oxBwLXEq rNtlydZBdu7gelugHT6LCXomgSy/2bZao/Kg8Kda/j3XBZEK77psC+Qvnc/wOrwpuoIF2 vvTiBedBcntBHi2CH1C1zOH2qD+MkUSOmEz1ofk2jyzPvXSw3cNckMzqI4rsGQUjIR+xy Q8kqZl5u6XlFUs1Gnv8wZjAQoi29uAfnq9V1V9Tvir2jDZqnUbDdWEvvZtEUz3vLIdt04 darOjpRq3Zcm4rzTgopKiOc1d9RWzeEU1I5td/uIlpHDqqm4WgHmpuWa7NH57qGhqww== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796483283; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=dXBJ38vqC6l4Vma8vSAe4/3BPfRVOHscax3f8mZaAwA=; b=Morp0bYbaySq5NFlqYt/sQfMzuJO0tNcCLf7d/OJUQ3nVrrxuYKffMGoZjBKG+WYqmgJ wTQnWwhhMI/4CMtkQiYxxpIWcEmjAlvWwd2uXXu4LOJbpTnweHxUeVKdvbgJQB3JFGx+1 F3iVJFTbzwJBZZX+yEX2I25n2OlxOODipTnIuW+oRixf+kWZgCxJ6JKQmpg1wjPI679+s usKbKMAodPH9b5IWFy9odq8IFYiHrRvED6oQ7I3pfpbBiTs3fquUyYV7gHVoHUe6rVY4L ZHzQ4D01BWANbRGvjA6/DNR7wWZPhm8aHku+pWCE69jv7CYPjjawU5Vo7Swg/XDLoHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="LidyB/PY"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36B7A606A322 for ; Sat, 5 Dec 2026 15:08:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LidyB/PY Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6C811F0092B; Sat, 5 Dec 2026 15:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796483282; bh=dXBJ38vqC6l4Vma8vSAe4/3BPfRVOHscax3f8mZaAwA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LidyB/PYTfHprm+dIrW4nU0IEfHsYpguUQzaBiqVAu5thBAFhvhPNHHOlSAqZ6uty JJDB0MuiRsnqteYuNgxDnVeSuYrnIwNsl8n6BUYKHE9GaEY7Eju24YkGm8VMddDQ3z nf4vr2iO8RBCfXgjA9pmmTEVKTCVs5yKmh93kHb8sDf3QSBqKrzMqGaOz4D/90nkXK MXcOlvNbH0e/vu0IlA2sZCWJsxPf4N4DBf8cCBwupR3hOVbxYH/n37frS6KJub9V6+ JUWuFgQabvbrvB5ogAwxUz4N01W7tUuFPzFFmenG6OTnOe7LmmOOLqLXfi6ZUPIPEJ 6RfIFoACb84iQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] crypto: tcrypt - restore request length in multi-update ahash speed tests Reply-To: sashiko-reviews@lists.linux.dev To: "Rani Hod" , "David S. Miller" , "Herbert Xu" Cc: linux-crypto@vger.kernel.org In-Reply-To: <20261205-tcrypt-ahash-nbytes-v1-1-6ab5355c2ba0@gmail.com> References: <20261205-tcrypt-ahash-nbytes-v1-1-6ab5355c2ba0@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 15:08:02 +0000 X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] crypto: tcrypt: non-standard Co-authored-by trailer in commit message -- commit 6e380fecad3b52fc13d296cb479c4a08d5ee0df9 Author: Rani Hod > crypto: tcrypt - restore request length in multi-update ahash speed tests > > Since commit 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in > API"), crypto_ahash_final() is an inline wrapper that sets req->nbytes > to zero and calls crypto_ahash_finup(). > > test_ahash_speed_common() sets the request length once with > ahash_request_set_crypt(), and test_ahash_jiffies() and > test_ahash_cycles() then run several init/update/final rounds on that > request. The final() at the end of the first round clears req->nbytes, > so every update() in later rounds hashes zero bytes. The results are > still reported as if blen bytes had been hashed in each round, which > inflates the multi-update figures (plen < blen) by up to two orders of > magnitude. The single-update cases (plen =3D=3D blen) go through > crypto_ahash_digest() and are not affected. > > For example, sha256-lib under QEMU (x86_64, TCG), "tcrypt.mode=3D404 > tcrypt.sec=3D1", in bytes/sec: > > test block per update before after > 15 4096 1024 1652248576 46739456 > 16 4096 4096 49266688 52375552 > 20 8192 4096 3241795584 52166656 > 21 8192 8192 45522944 54394880 > > Tests 16 and 21 are single-update cases and serve as a baseline. > > The cycles mode (tcrypt.sec=3D0) shows the same: test 15 went from > 1 cycle/byte to 92 cycles/byte, against 106 cycles/byte for test 16. > > Restore the request length at the start of every round. In > test_ahash_cycles() this is done before get_cycles(), so it is not > counted in the measurement. > > The problem was found while testing an out-of-tree hash driver. A > counter in the driver showed that a whole tcrypt run issued only as > many update requests to the hardware as the first round needs. The > analysis, the fix and this changelog were prepared with the help of an > AI coding assistant (Claude Opus 5.5) and reviewed by the submitter. > > Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API") > Co-authored-by: Claude Opus 5.5 > Signed-off-by: Rani Hod [Severity: Low] Should the Co-authored-by: trailer be dropped? scripts/checkpatch.pl warns that Co-authored-by: is a non-standard signatur= e. Kernel co-authorship uses Co-developed-by:, which requires a matching Signed-off-by: to certify the Developer Certificate of Origin, and per Documentation/process/coding-assistants.rst AI agents must not add one. Since AI assistance is already disclosed in the changelog body, removing th= is trailer avoids the checkpatch warning. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205-tcrypt-aha= sh-nbytes-v1-1-6ab5355c2ba0@gmail.com?part=3D1