mbox series

[v2,0/2] efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array

Message ID 20240711170727.it.194-kees@kernel.org (mailing list archive)
Headers show
Series efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array | expand

Message

Kees Cook July 11, 2024, 5:11 p.m. UTC
Hi,

Update efi_memory_attributes_table_t to use a proper flexible
array. Renames efi_early_memdesc_ptr() to efi_memdesc_ptr() so it more
accurately reflects its usage.

Thanks!

-Kees

 v2:
  - rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
  - add comment about reading efi_memdesc_ptr() to efi_memory_attributes_table_t
 v1: https://lore.kernel.org/lkml/20240710225538.work.224-kees@kernel.org/

Kees Cook (2):
  efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
  efi: Replace efi_memory_attributes_table_t 0-sized array with flexible
    array

 drivers/firmware/efi/libstub/relocate.c          |  2 +-
 drivers/firmware/efi/libstub/unaccepted_memory.c |  2 +-
 drivers/firmware/efi/libstub/x86-stub.c          |  2 +-
 drivers/firmware/efi/memattr.c                   |  2 +-
 include/linux/efi.h                              | 10 +++++++---
 5 files changed, 11 insertions(+), 7 deletions(-)

Comments

Ard Biesheuvel July 12, 2024, 8:08 a.m. UTC | #1
On Thu, 11 Jul 2024 at 19:11, Kees Cook <kees@kernel.org> wrote:
>
> Hi,
>
> Update efi_memory_attributes_table_t to use a proper flexible
> array. Renames efi_early_memdesc_ptr() to efi_memdesc_ptr() so it more
> accurately reflects its usage.
>
> Thanks!
>
> -Kees
>
>  v2:
>   - rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
>   - add comment about reading efi_memdesc_ptr() to efi_memory_attributes_table_t
>  v1: https://lore.kernel.org/lkml/20240710225538.work.224-kees@kernel.org/
>
> Kees Cook (2):
>   efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
>   efi: Replace efi_memory_attributes_table_t 0-sized array with flexible
>     array
>

Thanks, I've queued this up now.