* [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32
@ 2024-12-09 18:20 Hamza Mahfooz
2024-12-10 9:59 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Hamza Mahfooz @ 2024-12-09 18:20 UTC (permalink / raw)
To: linux-efi
Cc: Hamza Mahfooz, stable, Ard Biesheuvel, Allen Pais, Tyler Hicks,
Kuppuswamy Sathyanarayanan, Kirill A. Shutemov, Andrew Morton,
Jonathan Marek, open list
Recent platforms require more slack slots than the current value of
EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current
workaround is to append `efi=disable_early_pci_dma` to the kernel's
cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those
platforms to boot with the aforementioned workaround.
Cc: stable@kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Allen Pais <apais@linux.microsoft.com>
Cc: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
---
drivers/firmware/efi/libstub/efistub.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
index 76e44c185f29..e95ce6ae5c26 100644
--- a/drivers/firmware/efi/libstub/efistub.h
+++ b/drivers/firmware/efi/libstub/efistub.h
@@ -171,7 +171,7 @@ void efi_set_u64_split(u64 data, u32 *lo, u32 *hi)
* the EFI memory map. Other related structures, e.g. x86 e820ext, need
* to factor in this headroom requirement as well.
*/
-#define EFI_MMAP_NR_SLACK_SLOTS 8
+#define EFI_MMAP_NR_SLACK_SLOTS 32
typedef struct efi_generic_dev_path efi_device_path_protocol_t;
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32
2024-12-09 18:20 [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32 Hamza Mahfooz
@ 2024-12-10 9:59 ` Ard Biesheuvel
2024-12-19 10:26 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2024-12-10 9:59 UTC (permalink / raw)
To: Hamza Mahfooz
Cc: linux-efi, stable, Allen Pais, Tyler Hicks,
Kuppuswamy Sathyanarayanan, Kirill A. Shutemov, Andrew Morton,
Jonathan Marek, open list
On Mon, 9 Dec 2024 at 19:20, Hamza Mahfooz
<hamzamahfooz@linux.microsoft.com> wrote:
>
> Recent platforms require more slack slots than the current value of
> EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current
> workaround is to append `efi=disable_early_pci_dma` to the kernel's
> cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those
> platforms to boot with the aforementioned workaround.
>
> Cc: stable@kernel.org
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Allen Pais <apais@linux.microsoft.com>
> Cc: Tyler Hicks <code@tyhicks.com>
> Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
> ---
> drivers/firmware/efi/libstub/efistub.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
> index 76e44c185f29..e95ce6ae5c26 100644
> --- a/drivers/firmware/efi/libstub/efistub.h
> +++ b/drivers/firmware/efi/libstub/efistub.h
> @@ -171,7 +171,7 @@ void efi_set_u64_split(u64 data, u32 *lo, u32 *hi)
> * the EFI memory map. Other related structures, e.g. x86 e820ext, need
> * to factor in this headroom requirement as well.
> */
> -#define EFI_MMAP_NR_SLACK_SLOTS 8
> +#define EFI_MMAP_NR_SLACK_SLOTS 32
>
> typedef struct efi_generic_dev_path efi_device_path_protocol_t;
>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32
2024-12-10 9:59 ` Ard Biesheuvel
@ 2024-12-19 10:26 ` Ard Biesheuvel
2024-12-31 11:11 ` Víctor Gonzalo
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2024-12-19 10:26 UTC (permalink / raw)
To: Hamza Mahfooz
Cc: linux-efi, stable, Allen Pais, Tyler Hicks,
Kuppuswamy Sathyanarayanan, Kirill A. Shutemov, Andrew Morton,
Jonathan Marek, open list
On Tue, 10 Dec 2024 at 10:59, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Mon, 9 Dec 2024 at 19:20, Hamza Mahfooz
> <hamzamahfooz@linux.microsoft.com> wrote:
> >
> > Recent platforms require more slack slots than the current value of
> > EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current
> > workaround is to append `efi=disable_early_pci_dma` to the kernel's
> > cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those
> > platforms to boot with the aforementioned workaround.
> >
> > Cc: stable@kernel.org
> > Cc: Ard Biesheuvel <ardb@kernel.org>
> > Cc: Allen Pais <apais@linux.microsoft.com>
> > Cc: Tyler Hicks <code@tyhicks.com>
> > Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
> > ---
> > drivers/firmware/efi/libstub/efistub.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
> > index 76e44c185f29..e95ce6ae5c26 100644
> > --- a/drivers/firmware/efi/libstub/efistub.h
> > +++ b/drivers/firmware/efi/libstub/efistub.h
> > @@ -171,7 +171,7 @@ void efi_set_u64_split(u64 data, u32 *lo, u32 *hi)
> > * the EFI memory map. Other related structures, e.g. x86 e820ext, need
> > * to factor in this headroom requirement as well.
> > */
> > -#define EFI_MMAP_NR_SLACK_SLOTS 8
> > +#define EFI_MMAP_NR_SLACK_SLOTS 32
> >
> > typedef struct efi_generic_dev_path efi_device_path_protocol_t;
> >
>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
I've queued this up for v6.14 now - once we are confident it does not
cause any regressions, we can backport it to stable branches too.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32
2024-12-19 10:26 ` Ard Biesheuvel
@ 2024-12-31 11:11 ` Víctor Gonzalo
2025-01-07 7:36 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Víctor Gonzalo @ 2024-12-31 11:11 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Hamza Mahfooz, linux-efi, stable, Allen Pais, Tyler Hicks,
Kuppuswamy Sathyanarayanan, Kirill A. Shutemov, Andrew Morton,
Jonathan Marek, open list
El jue, 19 dic 2024 a las 12:27, Ard Biesheuvel (<ardb@kernel.org>) escribió:
>
> On Tue, 10 Dec 2024 at 10:59, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > On Mon, 9 Dec 2024 at 19:20, Hamza Mahfooz
> > <hamzamahfooz@linux.microsoft.com> wrote:
> > >
> > > Recent platforms require more slack slots than the current value of
> > > EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current
> > > workaround is to append `efi=disable_early_pci_dma` to the kernel's
> > > cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those
> > > platforms to boot with the aforementioned workaround.
> > >
> > > Cc: stable@kernel.org
> > > Cc: Ard Biesheuvel <ardb@kernel.org>
> > > Cc: Allen Pais <apais@linux.microsoft.com>
> > > Cc: Tyler Hicks <code@tyhicks.com>
> > > Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
> > > ---
> > > drivers/firmware/efi/libstub/efistub.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
> > > index 76e44c185f29..e95ce6ae5c26 100644
> > > --- a/drivers/firmware/efi/libstub/efistub.h
> > > +++ b/drivers/firmware/efi/libstub/efistub.h
> > > @@ -171,7 +171,7 @@ void efi_set_u64_split(u64 data, u32 *lo, u32 *hi)
> > > * the EFI memory map. Other related structures, e.g. x86 e820ext, need
> > > * to factor in this headroom requirement as well.
> > > */
> > > -#define EFI_MMAP_NR_SLACK_SLOTS 8
> > > +#define EFI_MMAP_NR_SLACK_SLOTS 32
> > >
> > > typedef struct efi_generic_dev_path efi_device_path_protocol_t;
> > >
> >
> > Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
> I've queued this up for v6.14 now - once we are confident it does not
> cause any regressions, we can backport it to stable branches too.
>
Hi. I had this issue three years ago, suggested the bump and then
missed the reply.
We bumped it to 16 and have not had any issue or side effects in three years.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32
2024-12-31 11:11 ` Víctor Gonzalo
@ 2025-01-07 7:36 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2025-01-07 7:36 UTC (permalink / raw)
To: Víctor Gonzalo
Cc: Hamza Mahfooz, linux-efi, stable, Allen Pais, Tyler Hicks,
Kuppuswamy Sathyanarayanan, Kirill A. Shutemov, Andrew Morton,
Jonathan Marek, open list
On Tue, 31 Dec 2024 at 12:12, Víctor Gonzalo
<victor.gonzalo@anddroptable.net> wrote:
>
> El jue, 19 dic 2024 a las 12:27, Ard Biesheuvel (<ardb@kernel.org>) escribió:
> >
> > On Tue, 10 Dec 2024 at 10:59, Ard Biesheuvel <ardb@kernel.org> wrote:
> > >
> > > On Mon, 9 Dec 2024 at 19:20, Hamza Mahfooz
> > > <hamzamahfooz@linux.microsoft.com> wrote:
> > > >
> > > > Recent platforms require more slack slots than the current value of
> > > > EFI_MMAP_NR_SLACK_SLOTS, otherwise they fail to boot. The current
> > > > workaround is to append `efi=disable_early_pci_dma` to the kernel's
> > > > cmdline. So, bump up EFI_MMAP_NR_SLACK_SLOTS to 32 to allow those
> > > > platforms to boot with the aforementioned workaround.
> > > >
> > > > Cc: stable@kernel.org
> > > > Cc: Ard Biesheuvel <ardb@kernel.org>
> > > > Cc: Allen Pais <apais@linux.microsoft.com>
> > > > Cc: Tyler Hicks <code@tyhicks.com>
> > > > Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
> > > > ---
> > > > drivers/firmware/efi/libstub/efistub.h | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
> > > > index 76e44c185f29..e95ce6ae5c26 100644
> > > > --- a/drivers/firmware/efi/libstub/efistub.h
> > > > +++ b/drivers/firmware/efi/libstub/efistub.h
> > > > @@ -171,7 +171,7 @@ void efi_set_u64_split(u64 data, u32 *lo, u32 *hi)
> > > > * the EFI memory map. Other related structures, e.g. x86 e820ext, need
> > > > * to factor in this headroom requirement as well.
> > > > */
> > > > -#define EFI_MMAP_NR_SLACK_SLOTS 8
> > > > +#define EFI_MMAP_NR_SLACK_SLOTS 32
> > > >
> > > > typedef struct efi_generic_dev_path efi_device_path_protocol_t;
> > > >
> > >
> > > Acked-by: Ard Biesheuvel <ardb@kernel.org>
> >
> > I've queued this up for v6.14 now - once we are confident it does not
> > cause any regressions, we can backport it to stable branches too.
> >
>
> Hi. I had this issue three years ago, suggested the bump and then
> missed the reply.
> We bumped it to 16 and have not had any issue or side effects in three years.
Thanks for the data point.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-07 7:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 18:20 [PATCH] efi: bump up EFI_MMAP_NR_SLACK_SLOTS to 32 Hamza Mahfooz
2024-12-10 9:59 ` Ard Biesheuvel
2024-12-19 10:26 ` Ard Biesheuvel
2024-12-31 11:11 ` Víctor Gonzalo
2025-01-07 7:36 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox