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=1796151143; b=du340weg02okDRC6rMctBwokJSUUSi2I6lI/6IJbm4QzAgPNjnNctFE8iRNSnOaIRCWJ XHYR5DrN/GjE/DEnYJh1S34Je7GoY2Stxc+g5Dukrnxx+tL8cLlFhpfZdnNsU5yEvGfaW mtbaa+GRA2+hSaMn9CcSqQUz5zSqNzgv3oDnmli5+uc+e2XilbJquimY/ANG8X9YXJHYZ 2iYnGApvV8Lvk4167QzKq7C3F+XKpICnd+1A2Thish2I5uP+7jGdVkwakJdIKQasx3m1v V9M0T8YaRW6ND5qqbfdASrM+oHwt02hX5htyNek3DhdZqdn0qrOcTF0eBLuWkDrrfyg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796151143; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=iMzjdARZOR39vgEQAsIBvWr1jY0hHJ00DuCWAiUE3ho=; b=RCgvcQx4ROLVMCjO6I/6CDXS9rAvOPGA9LtQXufFBxVWlvk0nYcETbDfHJ/PGcaZCspi YehPpDTb9jwThff8l2EltVbobyQucZF6ZSPXy+EvItYuC+YdacusTDMCkM/U12hpf+vPS yeyDljv0WjWgLjyFQIOzxh7c+8Mff7W4rzgcgFDhqupaw8uST1UGR7lOES1z07SHJIK46 HY2YxmFbIgfdbtBnhaxC3aRPdvwipvQE/JzW0Rl/QtUkNg+UUzL3qT0wneTaK4CeUjyVu 1UOr3sBiGHzDhvdc/SD0FZWZduogOlxzBDRUDzveZhK9/3zhTlopVtNMxYKZvDaezlw== 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=kCAE6Bds; 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 D42A3606A31A for ; Tue, 1 Dec 2026 18:52:23 +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=kCAE6Bds Received: by smtp.kernel.org (Postfix) with ESMTPSA id 755E91F000C1; Tue, 1 Dec 2026 18:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796151143; bh=iMzjdARZOR39vgEQAsIBvWr1jY0hHJ00DuCWAiUE3ho=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=kCAE6BdsllPnKZ6DIwhgNVgS0Zppllk38y0xbcgzsfrrMmuY4u+j0PIqJ3CoTCKTv /KquEVBf55uJAmDnLFBwpyEeX+fblv6H6RIbeHJ20M6yZTc0EHGy+ijCRODQ6CVduo DY2Qn3PPijJKqBnLlN8oObLrDuRkxLb5x1szLwYFVCJ8Wx9cdhw1k0WNG7I5EqEsmI t3vdnE8+KMe0sUniVsJupU7FyuF+g60NLNPj8t4QFYVgrZKjgHd5nwk8ee7OTYOJsk xpCd9TxyuHvonjr5mrCuaHsQ0eZlZtnta+3G0lWzIGgQB4uRAZlc3/005BRHom+lNO P95jN5keEpHuA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/4] crypto: Add a wrapper function for checking the HMAC key length in FIPS mode Reply-To: sashiko-reviews@lists.linux.dev To: "Thomas Huth" , "Herbert Xu" , linux-crypto@vger.kernel.org Cc: "David S. Miller" , "Eric Biggers" In-Reply-To: <20261201184722.887139-2-thuth@redhat.com> References: <20261201184722.887139-1-thuth@redhat.com> <20261201184722.887139-2-thuth@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 18:52:23 +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: hmac - use fips_hmac_keylen_disallowed() in hmac_setkey() -- commit 4ffb5320ef4c37faa3b0412bbad1381631271b73 Author: Thomas Huth crypto: Add a wrapper function for checking the HMAC key length in FIPS mode This commit introduces a fips_hmac_keylen_disallowed() helper in include/linux/fips.h and converts hmac_setkey_ahash() in crypto/hmac.c to use it. > diff --git a/crypto/hmac.c b/crypto/hmac.c > index 807e08b252c55..53ed48deb4b5a 100644 > --- a/crypto/hmac.c > +++ b/crypto/hmac.c > @@ -246,7 +246,7 @@ static int hmac_setkey_ahash(struct crypto_ahash *par= ent, > u8 *ipad =3D &tctx->pads[0]; > int err, i; > =20 > - if (fips_enabled && (keylen < 112 / 8)) > + if (fips_hmac_keylen_disallowed(keylen)) > return -EINVAL; [Severity: Low] Should hmac_setkey() in this file also use fips_hmac_keylen_disallowed()? crypto/hmac.c:hmac_setkey() { ... if (fips_enabled && (keylen < 112 / 8)) return -EINVAL; ... } Leaving the shash path open-coded means the shash and ahash HMAC setkey callbacks will diverge if fips_hmac_keylen_disallowed() is updated in the future. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201184722.8871= 39-1-thuth@redhat.com?part=3D1