[PATCH 3/3] efi_loader: create common function to free struct efi_disk_obj

2023-12-24 Thread Masahisa Kojima
Current error handling of creating raw disk/partition has following issues. - duplicate free for efi handle, efi handle is already freed in efi_delete_handle() - missing free for struct efi_device_path and struct efi_simple_file_system_protocol in some error paths To address those issue,

[PATCH 2/3] efi_loader: avoid pointer access after calling efi_delete_handle

2023-12-24 Thread Masahisa Kojima
efi_delete_handle() calls efi_purge_handle(), then it finally frees the efi handle. Both diskobj and handle variables in efi_disk_remove() have the same pointer, we can not access diskobj->dp after calling efi_delete_handle(). This commit saves the struct efi_device_path pointer before calling

[PATCH 1/3] efi_loader: remove unused members from struct efi_disk_obj

2023-12-24 Thread Masahisa Kojima
part and dev_index in struct efi_disk_obj are not used, let's remove it. This commit also removes the invalid structure comment for @dev, it does not exist. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_disk.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff

[PATCH 0/3] fix and refactoring of efi_disk.c

2023-12-24 Thread Masahisa Kojima
This series fixes the memory leak issue in lib/efi_loader/efi_disk.c and removes the unused members in struct efi_disk_obj. Masahisa Kojima (3): efi_loader: remove unused members from struct efi_disk_obj efi_loader: avoid pointer access after calling efi_delete_handle efi_loader: create

Re: [PATCH] arm: apple: Disable SMBIOS again

2023-12-24 Thread Mark Kettenis
> Date: Sun, 24 Dec 2023 20:37:47 +0100 > From: Heinrich Schuchardt > > On 12/24/23 19:12, Mark Kettenis wrote: > > Apple machines do not have memory below 4G. Since U-Boot does > > not support the SMBIOS 3 header structures this means we can't > > support SMBIOS on these machines.

Re: [PATCH] arm: apple: Disable SMBIOS again

2023-12-24 Thread Heinrich Schuchardt
On 12/24/23 19:12, Mark Kettenis wrote: Apple machines do not have memory below 4G. Since U-Boot does not support the SMBIOS 3 header structures this means we can't support SMBIOS on these machines. Unfortunately the refactoring of the SMBIOS code this cycle accidentally enabled it again.

[PATCH] arm: apple: Disable SMBIOS again

2023-12-24 Thread Mark Kettenis
Apple machines do not have memory below 4G. Since U-Boot does not support the SMBIOS 3 header structures this means we can't support SMBIOS on these machines. Unfortunately the refactoring of the SMBIOS code this cycle accidentally enabled it again. Fixes: 53fab13a7b1 ("efi: Use the installed