Re: [PATCH] efi: libstub: Use relocated version of kernel's struct screen_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Mar 2023 at 09:48, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>
> On Mon, 13 Mar 2023 at 09:14, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> >
> > In some cases, we expose the kernel's struct screen_info to the EFI stub
> > directly, so it gets populated before even entering the kernel.  This
> > means the early console is available as soon as the early param parsing
> > happens, which is nice. It also means we need two different ways to pass
> > this information, as this trick only works if the EFI stub is baked into
> > the core kernel image, which is not always the case.
> >
> > Huacai reports that the preparatory refactoring that was needed to
> > implement this alternative method for zboot resulted in a non-functional
> > efifb earlycon for other cases as well, due to the reordering of the
> > kernel image relocation with the population of the screen_info struct,
> > and the latter now takes place after copying the image to its new
> > location, which means we copy the old, uninitialized state.
> >
> > So let's ensure that alloc_screen_info() produces the correct
> > screen_info pointer, by keeping its relocated address in a global
> > variable.
> >
> > Cc: loongarch@xxxxxxxxxxxxxxx
> > Cc: Xuefeng Li <lixuefeng@xxxxxxxxxxx>
> > Cc: Xuerui Wang <kernel@xxxxxxxxxx>
> > Cc: loongson-kernel@xxxxxxxxxxxxxxxxx
> > Reported-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
> > Link: https://lore.kernel.org/linux-efi/20230310021749.921041-1-chenhuacai@xxxxxxxxxxx/
> > Fixes: 42c8ea3dca094ab8 ("efi: libstub: Factor out EFI stub entrypoint into separate file")
> > Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> This is still not working :-(
>

Huacai, could you try this patch please? It is working now - I don't
know what I did wrong before when testing it.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux