All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] verifiers: Don't return error for deferred image
@ 2022-12-22 11:14 Leo Yan
  2022-12-22 11:25 ` Zhang Boyang
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Yan @ 2022-12-22 11:14 UTC (permalink / raw)
  To: Daniel Kiper, Daniel Kiper, Alex Burmashev,
	Vladimir 'phcoder' Serbinenko, Ilias Apalodimas,
	grub-devel
  Cc: Leo Yan

When boot from menu and the flag GRUB_VERIFY_FLAGS_DEFER_AUTH is set,
grub returns error:

 Booting a command list

 error: verification requested but nobody cares: (hd0,gpt1)/Image.

 Press any key to continue...

In this case, the image should be deferred for authentication, grub
should return the file handle and pass down to later firmware (e.g.
U-Boot, etc) for authentication.

For this purpose, rather than returning error, this patch prints log
and returns file handler.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 grub-core/kern/verifiers.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/grub-core/kern/verifiers.c b/grub-core/kern/verifiers.c
index 75d7994cf..ada753e69 100644
--- a/grub-core/kern/verifiers.c
+++ b/grub-core/kern/verifiers.c
@@ -115,11 +115,7 @@ grub_verifiers_open (grub_file_t io, enum grub_file_type type)
   if (!ver)
     {
       if (defer)
-	{
-	  grub_error (GRUB_ERR_ACCESS_DENIED,
-		      N_("verification requested but nobody cares: %s"), io->name);
-	  goto fail_noclose;
-	}
+	grub_printf("%s verification is deferred\n", io->name);
 
       /* No verifiers wanted to verify. Just return underlying file. */
       return io;
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-06  5:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 11:14 [PATCH] verifiers: Don't return error for deferred image Leo Yan
2022-12-22 11:25 ` Zhang Boyang
2022-12-22 12:22   ` Leo Yan
2022-12-22 14:37     ` Zhang Boyang
2022-12-26  8:13       ` Leo Yan
2022-12-30 12:56         ` Zhang Boyang
2023-01-06  5:11           ` Leo Yan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.