Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-29 Thread Borislav Petkov
On Wed, Oct 28, 2020 at 04:45:49PM -0400, Arvind Sankar wrote: > It's become ABI I think: looks like it's included by that name in > vmcoreinfo for kexec crash dumps. Yeah, last time we had the ABI discussion we agreed with the kexec/crash folks that this is not an ABI and that crash is "tied" mor

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-28 Thread Arvind Sankar
On Wed, Oct 28, 2020 at 08:43:55PM +0100, Borislav Petkov wrote: > On Wed, Oct 28, 2020 at 12:45:51PM -0400, Arvind Sankar wrote: > > You don't want to try to run the kernel from physical address 0 in any > > case. The default is set to 16MiB to avoid low memory, historically to > > avoid the 24-bi

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-28 Thread Borislav Petkov
On Wed, Oct 28, 2020 at 12:45:51PM -0400, Arvind Sankar wrote: > You don't want to try to run the kernel from physical address 0 in any > case. The default is set to 16MiB to avoid low memory, historically to > avoid the 24-bit ISA DMA range. Sure, that's why I wrote: "... so I guess this should

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-28 Thread Borislav Petkov
On Tue, Oct 27, 2020 at 05:14:22PM -0400, Arvind Sankar wrote: > This is indeed just a small correctness fixlet, but I'm not following > the rest of your comments. I'm just trying to make sense of that house of cards we have here. > PHYSICAL_START has an effect independent of the setting of > REL

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-28 Thread Arvind Sankar
On Wed, Oct 28, 2020 at 02:39:09PM +0100, Borislav Petkov wrote: > On Tue, Oct 27, 2020 at 05:14:22PM -0400, Arvind Sankar wrote: > > This is indeed just a small correctness fixlet, but I'm not following > > the rest of your comments. > > I'm just trying to make sense of that house of cards we hav

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-27 Thread Arvind Sankar
On Tue, Oct 27, 2020 at 09:08:03PM +0100, Borislav Petkov wrote: > On Mon, Oct 05, 2020 at 11:15:39AM -0400, Arvind Sankar wrote: > > Commit b4e0409a36f4 ("x86: check vmlinux limits, 64-bit") added a check > > that the size of the 64-bit kernel is less than KERNEL_IMAGE_SIZE. > > > > The check use

Re: [PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-27 Thread Borislav Petkov
On Mon, Oct 05, 2020 at 11:15:39AM -0400, Arvind Sankar wrote: > Commit b4e0409a36f4 ("x86: check vmlinux limits, 64-bit") added a check > that the size of the 64-bit kernel is less than KERNEL_IMAGE_SIZE. > > The check uses (_end - _text), but this is not enough. The initial PMD > used in startup

[PATCH] x86/build: Fix vmlinux size check on 64-bit

2020-10-05 Thread Arvind Sankar
Commit b4e0409a36f4 ("x86: check vmlinux limits, 64-bit") added a check that the size of the 64-bit kernel is less than KERNEL_IMAGE_SIZE. The check uses (_end - _text), but this is not enough. The initial PMD used in startup_64() (level2_kernel_pgt) can only map upto KERNEL_IMAGE_SIZE from __STAR