Re: [PATCH 0/3] EFI fixes for -next

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

 



On Mon, 20 Jan 2020 at 11:01, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:
>
> On Mon, 20 Jan 2020 at 10:49, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >
> >
> > * Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> >
> > > A couple of fixes for more unusual configurations that weren't caught in
> > > my testing before. One for KASAN, one for the LLVM linker and one for the
> > > old EFI memory map when running on mixed mode systems.
> > >
> > > These apply onto the Git pull request [0[ that I sent out at the beginning
> > > of the week.
> > >
> > > [0] https://lore.kernel.org/linux-efi/20200113172245.27925-1-ardb@xxxxxxxxxx/
> > >
> > > Ard Biesheuvel (3):
> > >   efi/x86: avoid KASAN false positives when accessing the 1:1 mapping
> > >   x86/boot/compressed: relax sed symbol type regex for LLVM ld.lld
> > >   efi/x86: disallow efi=old_map in mixed mode
> > >
> > >  arch/x86/boot/Makefile         |  2 +-
> > >  arch/x86/platform/efi/efi_64.c | 11 ++++++-----
> > >  arch/x86/platform/uv/bios_uv.c |  2 +-
> > >  3 files changed, 8 insertions(+), 7 deletions(-)
> >
> > Just a minor bugreport, in some (weird) config combinations we now get
> > this build failure:
> >
> >   ld: arch/x86/platform/efi/efi_64.o: in function `efi_set_virtual_address_map':
> >   efi_64.c:(.init.text+0x1419): undefined reference to `__efi64_thunk'
> >   ld: efi_64.c:(.init.text+0x1530): undefined reference to `efi_uv1_memmap_phys_prolog'
> >   ld: efi_64.c:(.init.text+0x1706): undefined reference to `efi_uv1_memmap_phys_epilog'
> >
> > Config attached.
> >
> > I believe the trigger condition is:
> >
> >   !CONFIG_X86_UV
> >   CONFIG_EFI=y
> >
>
> Strange.
>
> Those references to missing symbols are guarded by efi_is_mixed() and
> efi_have_uv1_memmap(), both of which are static inline bool()
> functions wrapping IS_ENABLED() checks against CONFIG_EFI_MIXED and
> CONFIG_X86_UV, respectively. IOW, it is unexpected that the compiler
> doesn't const-propagate those expressions and optimize away the
> references entirely.
>

I think we should simply add the following - this should also cover
the remaining mixed mode KASAN issue that I mentioned.

diff --git a/arch/x86/platform/efi/Makefile b/arch/x86/platform/efi/Makefile
index 7ec3a8b31f8b..84b09c230cbd 100644
--- a/arch/x86/platform/efi/Makefile
+++ b/arch/x86/platform/efi/Makefile
@@ -1,5 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD_efi_thunk_$(BITS).o := y
+KASAN_SANITIZE := n
+GCOV_PROFILE := n

 obj-$(CONFIG_EFI)              += quirks.o efi.o efi_$(BITS).o
efi_stub_$(BITS).o
 obj-$(CONFIG_EFI_MIXED)                += efi_thunk_$(BITS).o



[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