U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] efi: fix and verify variables append_write
@ 2026-11-13 15:07 Vincent Stehlé
  2026-11-13 15:07 ` [PATCH 1/2] efi_loader: prevent set_variable() to record append_write Vincent Stehlé
  2026-11-13 15:07 ` [PATCH 2/2] efi_selftest: verify get_variable() never returns append_write Vincent Stehlé
  0 siblings, 2 replies; 8+ messages in thread
From: Vincent Stehlé @ 2026-11-13 15:07 UTC (permalink / raw)
  To: u-boot; +Cc: Heinrich Schuchardt, Ilias Apalodimas, Tom Rini,
	Vincent Stehlé

This couple of patches does the following:
- Fix a corner case of the non-TEE SetVariable(), which could record the
  APPEND_WRITE attribute when appending to non-existing variables.
- Enhance the existing selftest to verify that the APPEND_WRITE attribute
  is never returned by GetVariable().

See the second patch for the details to run on the sandbox.

I have also verified that the selftest changes do not harm with OP-TEE +
StMM. (This hits other issues with QueryVariableInfo() but they are
unrelated.)

We could reasonably reduce the test to verify the attributes only in the
cases where GetVariable() follows a SetVariable() with the append attribute
set, as those are arguably more likely to be buggy.
If this is preferred just let me know and I will send a v2.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
---
Vincent Stehlé (2):
      efi_loader: prevent set_variable() to record append_write
      efi_selftest: verify get_variable() never returns append_write

 lib/efi_loader/efi_variable.c             |  3 ++-
 lib/efi_selftest/efi_selftest_variables.c | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)
---
base-commit: ff8a9bc41e4e5bdd3406932af5abb4c18064e539
change-id: 20261113-append-1cfc64c0e0d8

Best regards,
--  
Vincent.


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

end of thread, other threads:[~2026-11-24 10:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 15:07 [PATCH 0/2] efi: fix and verify variables append_write Vincent Stehlé
2026-11-13 15:07 ` [PATCH 1/2] efi_loader: prevent set_variable() to record append_write Vincent Stehlé
2026-11-22 11:55   ` Heinrich Schuchardt
2026-11-24  8:48     ` Vincent Stehlé
2026-11-24  9:53       ` Vincent Stehlé
2026-11-24 10:10         ` Heinrich Schuchardt
2026-11-24 10:41           ` Vincent Stehlé
2026-11-13 15:07 ` [PATCH 2/2] efi_selftest: verify get_variable() never returns append_write Vincent Stehlé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox