* [PATCH master 2/4] efi: loader: fix EFI_EXIT2 tracing an uninitialized status
2026-08-31 13:24 [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Ahmad Fatoum
@ 2026-08-31 13:24 ` Ahmad Fatoum
2026-08-31 13:24 ` [PATCH master 3/4] fs: efivarfs: initialize dummy data written on variable creation Ahmad Fatoum
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-31 13:24 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
EFI_EXIT2() stores its argument in _r and passes that to EFI_EXIT(),
whose own _r shadows it, so typeof(_r) _r = _r reads the uninitialized
inner variable and the traced status is garbage.
This only affects trace output was and was detected by a warning when
being compiled with clang.
Fixes: c05e8108d769 ("efi: loader: add support for tracing calls back into UEFI")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/efi/loader/trace.h | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/efi/loader/trace.h b/include/efi/loader/trace.h
index 4acf7c1634cc..767812f84e26 100644
--- a/include/efi/loader/trace.h
+++ b/include/efi/loader/trace.h
@@ -34,24 +34,25 @@ const char *__efi_nesting_dec(void);
*/
#ifndef EFI_EXIT
#define EFI_EXIT(ret) ({ \
- typeof(ret) _r = ret; \
+ typeof(ret) __efi_r = ret; \
__EFI_PRINT("%sEFI: Exit: %s: %s (%u)\n", __efi_nesting_dec(), \
- __func__, efi_strerror((uintptr_t)_r), (u32)((uintptr_t) _r & ~EFI_ERROR_MASK)); \
- _r; \
+ __func__, efi_strerror((uintptr_t)__efi_r), \
+ (u32)((uintptr_t) __efi_r & ~EFI_ERROR_MASK)); \
+ __efi_r; \
})
#endif
#ifndef EFI_EXIT2
#define EFI_EXIT2(ret, val) ({ \
- typeof(ret) _r = ret; \
- if (EFI_ERROR(_r)) \
- EFI_EXIT(_r); \
+ typeof(ret) __efi_r2 = ret; \
+ if (EFI_ERROR(__efi_r2)) \
+ EFI_EXIT(__efi_r2); \
else \
__EFI_PRINT("%sEFI: Exit: %s: %s (%u) = 0x%llx\n", __efi_nesting_dec(), \
- __func__, efi_strerror((uintptr_t)_r), \
- (u32)((uintptr_t) _r & ~EFI_ERROR_MASK), \
+ __func__, efi_strerror((uintptr_t)__efi_r2), \
+ (u32)((uintptr_t) __efi_r2 & ~EFI_ERROR_MASK), \
(u64)(uintptr_t)(val)); \
- _r; \
+ __efi_r2; \
})
#endif
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH master 3/4] fs: efivarfs: initialize dummy data written on variable creation
2026-08-31 13:24 [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Ahmad Fatoum
2026-08-31 13:24 ` [PATCH master 2/4] efi: loader: fix EFI_EXIT2 tracing an uninitialized status Ahmad Fatoum
@ 2026-08-31 13:24 ` Ahmad Fatoum
2026-08-31 13:24 ` [PATCH master 4/4] sandbox: actually build the assembly setjmp/longjmp/initjmp Ahmad Fatoum
2026-09-02 8:25 ` [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-31 13:24 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Building with clang reports:
error: variable 'dummydata' is uninitialized when passed as a
const pointer argument here [-Werror,-Wuninitialized-const-pointer]
Fix this by initializing the variable.
Fixes: 46b5a6d6527f ("fs: efivars: implement write support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/efivarfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/efivarfs.c b/fs/efivarfs.c
index 1f53c06d66d3..b9f514c51cd9 100644
--- a/fs/efivarfs.c
+++ b/fs/efivarfs.c
@@ -58,7 +58,7 @@ static int efivars_create(struct device *dev, const char *pathname,
struct efivarfs_inode *inode;
efi_guid_t vendor;
efi_status_t efiret;
- u8 dummydata;
+ u8 dummydata = 0;
char *name8;
s16 *name;
int ret;
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH master 4/4] sandbox: actually build the assembly setjmp/longjmp/initjmp
2026-08-31 13:24 [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Ahmad Fatoum
2026-08-31 13:24 ` [PATCH master 2/4] efi: loader: fix EFI_EXIT2 tracing an uninitialized status Ahmad Fatoum
2026-08-31 13:24 ` [PATCH master 3/4] fs: efivarfs: initialize dummy data written on variable creation Ahmad Fatoum
@ 2026-08-31 13:24 ` Ahmad Fatoum
2026-09-02 8:25 ` [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-31 13:24 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
arch/sandbox/Makefile adds the host's um/ directory to pbl-y, but Kbuild
only consumes core-y from the arch Makefile, so the assembly
implementation selected by CONFIG_SANDBOX_SJLJ_ASM was lost.
Use core-y, so the assembly version overrides the weak C one.
Fixes: 48d0d0cc28ed ("kbuild: sync with Linux v6.17")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/sandbox/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index 08e09c53f7ef..cd11083e4deb 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -25,7 +25,7 @@ HOST_DIR := arch/$(HEADER_ARCH)
-include $(srctree)/$(HOST_DIR)/Makefile.um
-pbl-y += $(HOST_DIR)/um/
+core-y += $(HOST_DIR)/um/
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key
2026-08-31 13:24 [PATCH master 1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key Ahmad Fatoum
` (2 preceding siblings ...)
2026-08-31 13:24 ` [PATCH master 4/4] sandbox: actually build the assembly setjmp/longjmp/initjmp Ahmad Fatoum
@ 2026-09-02 8:25 ` Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2026-09-02 8:25 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 31 Aug 2026 15:24:51 +0200, Ahmad Fatoum wrote:
> The /boot/qemu_fw_cfg script has a guard for /dev/fw_cfg.cmdline but reads
> /dev/fw_cfg.initrd, so global.linux.bootargs.dyn.qemu ends up holding
> initrd contents instead of the -append string.
>
>
Applied, thanks!
[1/4] common: boards: qemu: read the command line from the cmdline fw_cfg key
https://git.pengutronix.de/cgit/barebox/commit/?id=fb389727a6d6 (link may not be stable)
[2/4] efi: loader: fix EFI_EXIT2 tracing an uninitialized status
https://git.pengutronix.de/cgit/barebox/commit/?id=9517f3e5ae01 (link may not be stable)
[3/4] fs: efivarfs: initialize dummy data written on variable creation
https://git.pengutronix.de/cgit/barebox/commit/?id=fcbe297b3755 (link may not be stable)
[4/4] sandbox: actually build the assembly setjmp/longjmp/initjmp
https://git.pengutronix.de/cgit/barebox/commit/?id=a74f7d7f00a1 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread