Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-21 Thread Ard Biesheuvel
On Wed, 21 Aug 2019 at 11:29, Mike Rapoport wrote: > > On Wed, Aug 21, 2019 at 10:29:37AM +0300, Ard Biesheuvel wrote: > > On Wed, 21 Aug 2019 at 10:11, Mike Rapoport wrote: > > > ... > > > I think the only missing part here is to ensure that non-reserved memory > > > in > > > bank 0 starts from

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-21 Thread Mike Rapoport
On Wed, Aug 21, 2019 at 10:29:37AM +0300, Ard Biesheuvel wrote: > On Wed, 21 Aug 2019 at 10:11, Mike Rapoport wrote: > > > > On Wed, Aug 21, 2019 at 09:35:16AM +0300, Ard Biesheuvel wrote: > > > On Wed, 21 Aug 2019 at 09:11, Chester Lin wrote: > > > > > > > > On Tue, Aug 20, 2019 at 03:28:25PM +0

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-21 Thread Ard Biesheuvel
On Wed, 21 Aug 2019 at 10:11, Mike Rapoport wrote: > > On Wed, Aug 21, 2019 at 09:35:16AM +0300, Ard Biesheuvel wrote: > > On Wed, 21 Aug 2019 at 09:11, Chester Lin wrote: > > > > > > On Tue, Aug 20, 2019 at 03:28:25PM +0300, Ard Biesheuvel wrote: > > > > On Tue, 20 Aug 2019 at 14:56, Russell Kin

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-21 Thread Chester Lin
On Wed, Aug 21, 2019 at 10:11:01AM +0300, Mike Rapoport wrote: > On Wed, Aug 21, 2019 at 09:35:16AM +0300, Ard Biesheuvel wrote: > > On Wed, 21 Aug 2019 at 09:11, Chester Lin wrote: > > > > > > On Tue, Aug 20, 2019 at 03:28:25PM +0300, Ard Biesheuvel wrote: > > > > On Tue, 20 Aug 2019 at 14:56, Ru

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-21 Thread Mike Rapoport
On Wed, Aug 21, 2019 at 09:35:16AM +0300, Ard Biesheuvel wrote: > On Wed, 21 Aug 2019 at 09:11, Chester Lin wrote: > > > > On Tue, Aug 20, 2019 at 03:28:25PM +0300, Ard Biesheuvel wrote: > > > On Tue, 20 Aug 2019 at 14:56, Russell King - ARM Linux admin > > > wrote: > > > > > > > > On Fri, Aug 02

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Ard Biesheuvel
On Wed, 21 Aug 2019 at 09:11, Chester Lin wrote: > > On Tue, Aug 20, 2019 at 03:28:25PM +0300, Ard Biesheuvel wrote: > > On Tue, 20 Aug 2019 at 14:56, Russell King - ARM Linux admin > > wrote: > > > > > > On Fri, Aug 02, 2019 at 05:38:54AM +, Chester Lin wrote: > > > > diff --git a/arch/arm/m

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Chester Lin
On Tue, Aug 20, 2019 at 03:28:25PM +0300, Ard Biesheuvel wrote: > On Tue, 20 Aug 2019 at 14:56, Russell King - ARM Linux admin > wrote: > > > > On Fri, Aug 02, 2019 at 05:38:54AM +, Chester Lin wrote: > > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > > > index f3ce34113f89..909b11ba48

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Ard Biesheuvel
On Tue, 20 Aug 2019 at 14:56, Russell King - ARM Linux admin wrote: > > On Fri, Aug 02, 2019 at 05:38:54AM +, Chester Lin wrote: > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > > index f3ce34113f89..909b11ba48d8 100644 > > --- a/arch/arm/mm/mmu.c > > +++ b/arch/arm/mm/mmu.c > > @@ -11

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Ard Biesheuvel
On Tue, 20 Aug 2019 at 14:54, Russell King - ARM Linux admin wrote: > > On Sun, Aug 04, 2019 at 10:57:00AM +0300, Ard Biesheuvel wrote: > > (The first TEXT_OFFSET bytes are no longer used in practice, which is > > why putting a reserved region of 4 KB bytes works at the moment, but > > this is fra

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Russell King - ARM Linux admin
On Fri, Aug 02, 2019 at 05:38:54AM +, Chester Lin wrote: > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index f3ce34113f89..909b11ba48d8 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -1184,6 +1184,9 @@ void __init adjust_lowmem_bounds(void) > phys_addr_t

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Russell King - ARM Linux admin
On Sun, Aug 04, 2019 at 10:57:00AM +0300, Ard Biesheuvel wrote: > (The first TEXT_OFFSET bytes are no longer used in practice, which is > why putting a reserved region of 4 KB bytes works at the moment, but > this is fragile). That is not correct for 32-bit ARM. The swapper page table is still lo

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Ard Biesheuvel
On Tue, 20 Aug 2019 at 10:49, Mike Rapoport wrote: > > On Mon, Aug 19, 2019 at 05:56:51PM +0300, Ard Biesheuvel wrote: > > On Mon, 19 Aug 2019 at 11:01, Chester Lin wrote: > > > > > > Hi Mike and Ard, > > > > > > On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > > > > On Thu, Aug 1

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Chester Lin
On Tue, Aug 20, 2019 at 10:49:30AM +0300, Mike Rapoport wrote: > On Mon, Aug 19, 2019 at 05:56:51PM +0300, Ard Biesheuvel wrote: > > On Mon, 19 Aug 2019 at 11:01, Chester Lin wrote: > > > > > > Hi Mike and Ard, > > > > > > On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > > > > On T

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Mike Rapoport
On Mon, Aug 19, 2019 at 05:56:51PM +0300, Ard Biesheuvel wrote: > On Mon, 19 Aug 2019 at 11:01, Chester Lin wrote: > > > > Hi Mike and Ard, > > > > On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > > > On Thu, Aug 15, 2019 at 02:32:50PM +0300, Ard Biesheuvel wrote: > > > > (adding M

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-20 Thread Chester Lin
On Mon, Aug 19, 2019 at 05:56:51PM +0300, Ard Biesheuvel wrote: > On Mon, 19 Aug 2019 at 11:01, Chester Lin wrote: > > > > Hi Mike and Ard, > > > > On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > > > On Thu, Aug 15, 2019 at 02:32:50PM +0300, Ard Biesheuvel wrote: > > > > (adding M

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-19 Thread Ard Biesheuvel
On Mon, 19 Aug 2019 at 11:01, Chester Lin wrote: > > Hi Mike and Ard, > > On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > > On Thu, Aug 15, 2019 at 02:32:50PM +0300, Ard Biesheuvel wrote: > > > (adding Mike) > > > > > > On Thu, 15 Aug 2019 at 14:28, Chester Lin wrote: > > > > > >

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-19 Thread Chester Lin
Hi Mike and Ard, On Thu, Aug 15, 2019 at 04:37:39PM +0300, Mike Rapoport wrote: > On Thu, Aug 15, 2019 at 02:32:50PM +0300, Ard Biesheuvel wrote: > > (adding Mike) > > > > On Thu, 15 Aug 2019 at 14:28, Chester Lin wrote: > > > > > > Hi Ard, > > > > > > On Thu, Aug 15, 2019 at 10:59:43AM +0300, A

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-15 Thread Mike Rapoport
On Thu, Aug 15, 2019 at 02:32:50PM +0300, Ard Biesheuvel wrote: > (adding Mike) > > On Thu, 15 Aug 2019 at 14:28, Chester Lin wrote: > > > > Hi Ard, > > > > On Thu, Aug 15, 2019 at 10:59:43AM +0300, Ard Biesheuvel wrote: > > > On Sun, 4 Aug 2019 at 10:57, Ard Biesheuvel > > > wrote: > > > > > >

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-15 Thread Chester Lin
Hi Ard, On Thu, Aug 15, 2019 at 10:59:43AM +0300, Ard Biesheuvel wrote: > On Sun, 4 Aug 2019 at 10:57, Ard Biesheuvel wrote: > > > > Hello Chester, > > > > On Fri, 2 Aug 2019 at 08:40, Chester Lin wrote: > > > > > > In some cases the arm32 efistub could fail to allocate memory for > > > uncompre

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-15 Thread Ard Biesheuvel
(adding Mike) On Thu, 15 Aug 2019 at 14:28, Chester Lin wrote: > > Hi Ard, > > On Thu, Aug 15, 2019 at 10:59:43AM +0300, Ard Biesheuvel wrote: > > On Sun, 4 Aug 2019 at 10:57, Ard Biesheuvel > > wrote: > > > > > > Hello Chester, > > > > > > On Fri, 2 Aug 2019 at 08:40, Chester Lin wrote: > > >

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-15 Thread Ard Biesheuvel
On Sun, 4 Aug 2019 at 10:57, Ard Biesheuvel wrote: > > Hello Chester, > > On Fri, 2 Aug 2019 at 08:40, Chester Lin wrote: > > > > In some cases the arm32 efistub could fail to allocate memory for > > uncompressed kernel. For example, we got the following error message when > > verifying EFI stub

RE: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-14 Thread Guillaume Gardet
.@lists.infradead.org; linux-ker...@vger.kernel.org; linux- > e...@vger.kernel.org; Guillaume Gardet ; Joey Lee > ; Gary Lin > Subject: Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel > base > > Hello Chester, > > On Fri, 2 Aug 2019 at 08:40, Chester Lin w

Re: [PATCH] efi/arm: fix allocation failure when reserving the kernel base

2019-08-04 Thread Ard Biesheuvel
Hello Chester, On Fri, 2 Aug 2019 at 08:40, Chester Lin wrote: > > In some cases the arm32 efistub could fail to allocate memory for > uncompressed kernel. For example, we got the following error message when > verifying EFI stub on Raspberry Pi-2 [kernel-5.2.1 + grub-2.04] : > > EFI stub: Boot