Message ID | 20231222150156.39783-1-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Commit | 4b151562bb8e54160adedbc6a1c0c749c00a2f84 |
Headers | show |
Series | [1/1] bootmeth: pass size to efi_binary_run() | expand |
On Fri, 22 Dec 2023 at 17:02, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > > If we call efi_binary_run() with size parameter set to zero, we get an error > > Not a PE-COFF file > > Fill the missing value. > > Fixes: 1373ffde52e1 ("Merge tag 'v2024.01-rc5' into next") > Fixes: 7017fc54a5bc ("bootmeth: use efi_loader interfaces instead of bootefi command") > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> > --- > boot/bootmeth_efi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c > index 00060f7d25..c4eb331d69 100644 > --- a/boot/bootmeth_efi.c > +++ b/boot/bootmeth_efi.c > @@ -454,12 +454,12 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) > > if (bflow->flags & BOOTFLOWF_USE_BUILTIN_FDT) { > log_debug("Booting with built-in fdt\n"); > - if (efi_binary_run(map_sysmem(kernel, 0), 0, > + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, > EFI_FDT_USE_INTERNAL)) > return log_msg_ret("run", -EINVAL); > } else { > log_debug("Booting with external fdt\n"); > - if (efi_binary_run(map_sysmem(kernel, 0), 0, > + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, > map_sysmem(fdt, 0))) > return log_msg_ret("run", -EINVAL); > } > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
On Fri, 22 Dec 2023 16:01:56 +0100, Heinrich Schuchardt wrote: > If we call efi_binary_run() with size parameter set to zero, we get an error > > Not a PE-COFF file > > Fill the missing value. > > > [...] Applied to u-boot/next, thanks!
On Fri, Dec 22, 2023 at 3:37 PM Tom Rini <trini@konsulko.com> wrote: > > On Fri, 22 Dec 2023 16:01:56 +0100, Heinrich Schuchardt wrote: > > > If we call efi_binary_run() with size parameter set to zero, we get an error > > > > Not a PE-COFF file > > > > Fill the missing value. > > > > > > [...] > > Applied to u-boot/next, thanks! Is this a fix that should land for 2024.01?
On Fri, 22 Dec 2023 at 17:43, Peter Robinson <pbrobinson@gmail.com> wrote: > > On Fri, Dec 22, 2023 at 3:37 PM Tom Rini <trini@konsulko.com> wrote: > > > > On Fri, 22 Dec 2023 16:01:56 +0100, Heinrich Schuchardt wrote: > > > > > If we call efi_binary_run() with size parameter set to zero, we get an error > > > > > > Not a PE-COFF file > > > > > > Fill the missing value. > > > > > > > > > [...] > > > > Applied to u-boot/next, thanks! > > Is this a fix that should land for 2024.01? I was about to ask the same. I think it should go into -master as well Thanks /Ilias
On Fri, Dec 22, 2023 at 05:46:11PM +0200, Ilias Apalodimas wrote: > On Fri, 22 Dec 2023 at 17:43, Peter Robinson <pbrobinson@gmail.com> wrote: > > > > On Fri, Dec 22, 2023 at 3:37 PM Tom Rini <trini@konsulko.com> wrote: > > > > > > On Fri, 22 Dec 2023 16:01:56 +0100, Heinrich Schuchardt wrote: > > > > > > > If we call efi_binary_run() with size parameter set to zero, we get an error > > > > > > > > Not a PE-COFF file > > > > > > > > Fill the missing value. > > > > > > > > > > > > [...] > > > > > > Applied to u-boot/next, thanks! > > > > Is this a fix that should land for 2024.01? > > I was about to ask the same. I think it should go into -master as well This specifically fixes the merge of -rc5 in to -next however.
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 00060f7d25..c4eb331d69 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -454,12 +454,12 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) if (bflow->flags & BOOTFLOWF_USE_BUILTIN_FDT) { log_debug("Booting with built-in fdt\n"); - if (efi_binary_run(map_sysmem(kernel, 0), 0, + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, EFI_FDT_USE_INTERNAL)) return log_msg_ret("run", -EINVAL); } else { log_debug("Booting with external fdt\n"); - if (efi_binary_run(map_sysmem(kernel, 0), 0, + if (efi_binary_run(map_sysmem(kernel, 0), bflow->size, map_sysmem(fdt, 0))) return log_msg_ret("run", -EINVAL); }
If we call efi_binary_run() with size parameter set to zero, we get an error Not a PE-COFF file Fill the missing value. Fixes: 1373ffde52e1 ("Merge tag 'v2024.01-rc5' into next") Fixes: 7017fc54a5bc ("bootmeth: use efi_loader interfaces instead of bootefi command") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- boot/bootmeth_efi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.43.0