lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXFua3LuoD=-7rkS1UuBXXCppsc32tZryyu2GoS4mpwzVQ@mail.gmail.com>
Date:   Tue, 4 Aug 2020 14:45:25 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Marco Elver <elver@...gle.com>,
        Arvind Sankar <nivedita@...m.mit.edu>,
        kasan-dev <kasan-dev@...glegroups.com>, linux-mm@...ck.org,
        linux-efi <linux-efi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Walter Wu <walter-zh.wu@...iatek.com>,
        Elena Petrova <lenaptr@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Catalin Marinas <catalin.marinas@....com>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2 2/5] efi: provide empty efi_enter_virtual_mode implementation

On Tue, 4 Aug 2020 at 14:41, Andrey Konovalov <andreyknvl@...gle.com> wrote:
>
> When CONFIG_EFI is not enabled, we might get an undefined reference
> to efi_enter_virtual_mode() error, if this efi_enabled() call isn't
> inlined into start_kernel(). This happens in particular, if start_kernel()
> is annodated with __no_sanitize_address.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>

Acked-by: Ard Biesheuvel <ardb@...nel.org>

> ---
>  include/linux/efi.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 05c47f857383..73db1ae04cef 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -606,7 +606,11 @@ extern void *efi_get_pal_addr (void);
>  extern void efi_map_pal_code (void);
>  extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
>  extern void efi_gettimeofday (struct timespec64 *ts);
> +#ifdef CONFIG_EFI
>  extern void efi_enter_virtual_mode (void);     /* switch EFI to virtual mode, if possible */
> +#else
> +static inline void efi_enter_virtual_mode (void) {}
> +#endif
>  #ifdef CONFIG_X86
>  extern efi_status_t efi_query_variable_store(u32 attributes,
>                                              unsigned long size,
> --
> 2.28.0.163.g6104cc2f0b6-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ