Re: [PATCH v16 8/7] pkcs7: Change a pr_warn() to pr_warn_once()

From: Jarkko Sakkinen

Date: Sun Feb 08 2026 - 08:41:59 EST


On Thu, Feb 05, 2026 at 03:47:06PM +0000, David Howells wrote:
> Only display the "PKCS7: Waived invalid module sig (has authattrs)" once.
>
> Suggested-by: Lenny Szubowicz <lszubowi@xxxxxxxxxx>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> Tested-by: Lenny Szubowicz <lszubowi@xxxxxxxxxx>
> cc: Lukas Wunner <lukas@xxxxxxxxx>
> cc: Ignat Korchagin <ignat@xxxxxxxxxxxxxx>
> cc: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
> cc: Stephan Mueller <smueller@xxxxxxxxxx>
> cc: Eric Biggers <ebiggers@xxxxxxxxxx>
> cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> cc: keyrings@xxxxxxxxxxxxxxx
> cc: linux-crypto@xxxxxxxxxxxxxxx
> ---
> crypto/asymmetric_keys/pkcs7_verify.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
> index 519eecfe6778..474e2c1ae21b 100644
> --- a/crypto/asymmetric_keys/pkcs7_verify.c
> +++ b/crypto/asymmetric_keys/pkcs7_verify.c
> @@ -427,7 +427,7 @@ int pkcs7_verify(struct pkcs7_message *pkcs7,
> if (pkcs7->have_authattrs) {
> #ifdef CONFIG_PKCS7_WAIVE_AUTHATTRS_REJECTION_FOR_MLDSA
> if (pkcs7->authattrs_rej_waivable) {
> - pr_warn("Waived invalid module sig (has authattrs)\n");
> + pr_warn_once("Waived invalid module sig (has authattrs)\n");
> break;
> }
> #endif
>

Could be also ratelimited but I guess here once is the right call:

Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

BR, Jarkko