lkml.org 
[lkml]   [2023]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip: x86/urgent] x86/setup: Always reserve the first 1M of RAM
Hi Andy,

On Wed, Mar 01, 2023 at 07:51:43PM -0800, Andy Lutomirski wrote:
> On Thu, Jun 3, 2021, at 11:01 AM, tip-bot2 for Mike Rapoport wrote:
> >
> > x86/setup: Always reserve the first 1M of RAM
> >

...

> + /*
> + * Unconditionally reserve the entire fisrt 1M, see comment in
> + * setup_arch().
> + */
> + memblock_reserve(0, SZ_1M);
>
>
> But this runs even if we just failed to allocate a trampoline on the
> first try, again dooming the kernel to panic.
>
> I real the commit message and the linked bug, and I'm having trouble
> finding evidence of anything actually fixed by this patch. Can we just
> revert it? If not, it would be nice to get a fixup patch that genuinely
> cleans this up -- the whole structure of the code (first, try to allocate
> trampoline, then free boot services, then try again) isn't really
> conducive to a model where we *don't* free boot services < 1M.

Currently, the second attempt to set_real_mode_mem() in
efi_free_boot_services() does not allocate from memblock anyway but reuses
memory freed from EFI services. Could be that failure to boot caused by
another failing reservation?

> Discovered by my delightful laptop, which does not boot with this patch applied.

Do you have early_printk() visible?

> --Andy

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2023-03-27 00:42    [W:0.722 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site