Re: [PATCH v4] x86, efi: never relocate kernel below lowest acceptable address

2019-10-22 Thread Kairui Song
On Tue, Oct 22, 2019 at 6:15 PM Ard Biesheuvel wrote: > > On Tue, 22 Oct 2019 at 09:45, Borislav Petkov wrote: > > > > On Tue, Oct 22, 2019 at 08:13:56AM +0200, Ard Biesheuvel wrote: > > > On Thu, 17 Oct 2019 at 11:30, Kairui Song wrote: > > > > > >

[PATCH v4] x86, efi: never relocate kernel below lowest acceptable address

2019-10-17 Thread Kairui Song
ocated below it. Then the relocation before decompression, which move kernel to the end of the decompression buffer, will overwrite other memory region, as there is no enough memory there. To fix it, just don't let EFI stub relocate the kernel to any address lower than lowest acceptable address. Signed

Re: [PATCH v3] x86, efi: never relocate kernel below lowest acceptable address

2019-10-14 Thread Kairui Song
On Mon, Oct 14, 2019 at 6:14 PM Borislav Petkov wrote: > > On Sat, Oct 12, 2019 at 11:44:21AM +0800, Kairui Song wrote: > > Currently, kernel fails to boot on some HyperV VMs when using EFI. > > And it's a potential issue on all platforms. > > > > It's

Re: [PATCH v2] x86, efi: never relocate kernel below lowest acceptable address

2019-10-11 Thread Kairui Song
On Fri, Oct 11, 2019 at 9:24 PM Borislav Petkov wrote: > > On Fri, Sep 20, 2019 at 12:05:21AM +0800, Kairui Song wrote: > > Currently, kernel fails to boot on some HyperV VMs when using EFI. > > And it's a potential issue on all platforms. > > > > It's

[PATCH v3] x86, efi: never relocate kernel below lowest acceptable address

2019-10-11 Thread Kairui Song
uld over write critical memory, crashing the system. To fix it, just don't let efi stub relocate the kernel to any address lower than lowest acceptable address. Signed-off-by: Kairui Song Acked-by: Jarkko Sakkinen --- Update from V2: - Update part of the commit message. Update from V1: -

Re: [PATCH v2] x86, efi: never relocate kernel below lowest acceptable address

2019-10-11 Thread Kairui Song
On Thu, Sep 26, 2019 at 1:36 AM Kairui Song wrote: > > On Wed, Sep 25, 2019 at 11:25 PM Ard Biesheuvel > wrote: > > > > On Thu, 19 Sep 2019 at 18:06, Kairui Song wrote: > > > > > > Currently, kernel fails to boot on some HyperV VMs when using EFI.

Re: [PATCH v2] x86, efi: never relocate kernel below lowest acceptable address

2019-09-25 Thread Kairui Song
On Wed, Sep 25, 2019 at 11:25 PM Ard Biesheuvel wrote: > > On Thu, 19 Sep 2019 at 18:06, Kairui Song wrote: > > > > Currently, kernel fails to boot on some HyperV VMs when using EFI. > > And it's a potential issue on all platforms. > > > > It's ca

[PATCH v2] x86, efi: never relocate kernel below lowest acceptable address

2019-09-19 Thread Kairui Song
st acceptable address. Signed-off-by: Kairui Song --- Update from V1: - Redo the commit message. arch/x86/boot/compressed/eboot.c | 8 +--- drivers/firmware/efi/libstub/arm32-stub.c | 2 +- drivers/firmware/efi/libstub/arm64-stub.c | 2 +- drivers/firmware/efi/

[RFC PATCH] x86, efi: never relocate the kernel below LOAD_PHYSICAL_ADDR

2019-09-10 Thread Kairui Song
efi_low_alloc accept an extra min_addr argument, to restrict the lower bound of an allocation. And don't relocate the kernel lower than LOAD_PHYSICAL_ADDR when failed to reserve the preferred address. Signed-off-by: Kairui Song --- arch/x86/boot/compressed/eboot.c | 8 +--- dr