Re: [PATCH 0/6] Apple device properties

From: Matt Fleming
Date: Thu Aug 18 2016 - 20:50:46 EST


On Mon, 15 Aug, at 06:13:58PM, Lukas Wunner wrote:
>
> But I would like to understand the "cannot jump through pointers at
> runtime" argument because the binary code looks to me like it should
> work on 32 bit. I guess I must be missing something obvious?

Ah no, I forgot that efi_boot_services_{32,64}_t doesn't contain
pointers - it contains u32/u64 objects. So yeah, your patch looks
fine.

It does trigger the following warnings when building for i386 though,

In file included from /dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c:14:0:
/dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c: In function âefi_get_memory_mapâ:
/dev/shm/mfleming/git/efi/arch/x86/include/asm/efi.h:205:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
((efi_boot_services_64_t *)__efi_early()->boot_services)->f : \
^
/dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c:85:11: note: in expansion of macro âefi_call_earlyâ
status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
^
/dev/shm/mfleming/git/efi/arch/x86/include/asm/efi.h:206:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
((efi_boot_services_32_t *)__efi_early()->boot_services)->f, \
^
/dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c:85:11: note: in expansion of macro âefi_call_earlyâ
status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
^
/dev/shm/mfleming/git/efi/arch/x86/include/asm/efi.h:205:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
((efi_boot_services_64_t *)__efi_early()->boot_services)->f : \
^
/dev/shm/mfleming/git/efi/drivers/firmware/efi/libstub/efi-stub-helper.c:92:11: note: in expansion of macro âefi_call_earlyâ
status = efi_call_early(get_memory_map, map_size, m,
^
etc.