Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257236
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] efi: use correct type for struct efi_memory_map::phys_map |
| Date | 2015-10-27 22:10 +0100 |
| Message-ID | <qojFi-1MD-61@gated-at.bofh.it> (permalink) |
| References | <qmGmD-4MY-15@gated-at.bofh.it> <qmH8Z-5X0-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 23 Oct, at 11:48:16AM, Ard Biesheuvel wrote:
> We have been getting away with using a void* for the physical
> address of the UEFI memory map, since, even on 32-bit platforms
> with 64-bit physical addresses, no truncation takes place if the
> memory map has been allocated by the firmware (which only uses
> 1:1 virtually addressable memory), which is usually the case.
>
> However, commit 0f96a99dab36 ("efi: Add "efi_fake_mem" boot option")
> adds code that clones and modifies the UEFI memory map, and the
> clone may live above 4 GB on 32-bit platforms. This means our use
> of void* for struct efi_memory_map::phys_map has graduated from
> 'incorrect but working' to 'incorrect and broken', and we need to
> fix it.
>
> So redefine struct efi_memory_map::phys_map as phys_addr_t, and
> get rid of a bunch of casts that are now unneeded.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> arch/arm64/kernel/efi.c | 4 ++--
> arch/x86/platform/efi/efi.c | 4 ++--
> drivers/firmware/efi/efi.c | 8 ++++----
> include/linux/efi.h | 2 +-
> 4 files changed, 9 insertions(+), 9 deletions(-)
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Taku Izumi <izumi.taku@jp.fujitsu.com> - 2015-10-23 02:50 +0200
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-10-23 10:40 +0200
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-23 11:00 +0200
[PATCH 1/2] efi: use correct type for struct efi_memory_map::phys_map Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-10-23 11:50 +0200
[PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-10-23 11:50 +0200
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-23 12:30 +0200
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-23 12:40 +0200
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-23 12:40 +0200
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Matt Fleming <matt@codeblueprint.co.uk> - 2015-10-27 22:20 +0100
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-28 12:40 +0100
Re: [PATCH 2/2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Matt Fleming <matt@codeblueprint.co.uk> - 2015-10-27 22:20 +0100
[tip:core/efi] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds tip-bot for Taku Izumi <tipbot@zytor.com> - 2015-10-28 22:00 +0100
Re: [PATCH 1/2] efi: use correct type for struct efi_memory_map::phys_map Matt Fleming <matt@codeblueprint.co.uk> - 2015-10-27 22:10 +0100
[tip:core/efi] efi: Use correct type for struct efi_memory_map:: phys_map tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2015-10-28 22:00 +0100
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Matt Fleming <matt@codeblueprint.co.uk> - 2015-10-26 22:10 +0100
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-10-27 03:40 +0100
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Matt Fleming <matt@codeblueprint.co.uk> - 2015-10-27 22:10 +0100
Re: [PATCH v2] efi: Fix warning of int-to-pointer-cast on x86 32-bit builds Ingo Molnar <mingo@kernel.org> - 2015-10-23 10:50 +0200
csiph-web