From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Thorsten Blum" <blum@kernel.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Lenny Szubowicz" <lszubowi@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Francesco Pompo" <francescopompo2@gmail.com>
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] efistub/x86: Use struct boot_e820_entry for size calculations
Date: Thu, 10 Sep 2026 09:43:43 +0200 [thread overview]
Message-ID: <7df8a578-06da-4769-9e9f-f8765fb87e9e@app.fastmail.com> (raw)
In-Reply-To: <20260829212037.335569-2-blum@kernel.org>
On Sat, 29 Aug 2026, at 23:20, Thorsten Blum wrote:
> alloc_e820ext() and setup_e820() use sizeof(struct e820_entry) when
> calculating the sizes of boot_e820_entry structures.
>
> Even though struct e820_entry and struct boot_e820_entry have the same
> size, use sizeof(struct boot_e820_entry) for consistency instead.
>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
> drivers/firmware/efi/libstub/x86-stub.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Queued up in efi/next - thanks.
> diff --git a/drivers/firmware/efi/libstub/x86-stub.c
> b/drivers/firmware/efi/libstub/x86-stub.c
> index cef32e2c82d8..ae2481f8a4c3 100644
> --- a/drivers/firmware/efi/libstub/x86-stub.c
> +++ b/drivers/firmware/efi/libstub/x86-stub.c
> @@ -648,7 +648,7 @@ setup_e820(struct boot_params *params, struct
> setup_data *e820ext, u32 e820ext_s
> }
>
> if (nr_entries == ARRAY_SIZE(params->e820_table)) {
> - u32 need = (nr_desc - i) * sizeof(struct e820_entry) +
> + u32 need = (nr_desc - i) * sizeof(struct boot_e820_entry) +
> sizeof(struct setup_data);
>
> if (!e820ext || e820ext_size < need)
> @@ -684,7 +684,7 @@ static efi_status_t alloc_e820ext(u32 nr_desc,
> struct setup_data **e820ext,
> unsigned long size;
>
> size = sizeof(struct setup_data) +
> - sizeof(struct e820_entry) * nr_desc;
> + sizeof(struct boot_e820_entry) * nr_desc;
>
> if (*e820ext) {
> efi_bs_call(free_pool, *e820ext);
prev parent reply other threads:[~2026-09-10 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 21:20 Thorsten Blum
2026-09-10 7:43 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7df8a578-06da-4769-9e9f-f8765fb87e9e@app.fastmail.com \
--to=ardb@kernel.org \
--cc=blum@kernel.org \
--cc=bp@alien8.de \
--cc=francescopompo2@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=javierm@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lszubowi@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®