asymmetric_keys: log on fatal failures in PE/pkcs7
authorRobbie Harwood <rharwood@redhat.com>
Mon, 20 Feb 2023 17:12:54 +0000 (12:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:11 +0000 (12:35 +0200)
commit3221808c1c6e40f1f8316c934d944c62d10dacdb
tree015d9c00f138aba6349491449508037af0ba8a6d
parentd29a47b456fd4d47072951f619ce9c2dd0b4aaa8
asymmetric_keys: log on fatal failures in PE/pkcs7

[ Upstream commit 3584c1dbfffdabf8e3dc1dd25748bb38dd01cd43 ]

These particular errors can be encountered while trying to kexec when
secureboot lockdown is in place.  Without this change, even with a
signed debug build, one still needs to reboot the machine to add the
appropriate dyndbg parameters (since lockdown blocks debugfs).

Accordingly, upgrade all pr_debug() before fatal error into pr_warn().

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jarkko Sakkinen <jarkko@kernel.org>
cc: Eric Biederman <ebiederm@xmission.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: keyrings@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: kexec@lists.infradead.org
Link: https://lore.kernel.org/r/20230220171254.592347-3-rharwood@redhat.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/asymmetric_keys/pkcs7_verify.c
crypto/asymmetric_keys/verify_pefile.c