linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Marco Elver <elver@google.com>, Ard Biesheuvel <ardb@kernel.org>,
	Arvind Sankar <nivedita@alum.mit.edu>,
	kasan-dev@googlegroups.com, linux-mm@kvack.org,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Walter Wu <walter-zh.wu@mediatek.com>,
	Elena Petrova <lenaptr@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Andrey Konovalov <andreyknvl@google.com>,
	kernel test robot <lkp@intel.com>
Subject: [PATCH v2 2/5] efi: provide empty efi_enter_virtual_mode implementation
Date: Tue,  4 Aug 2020 14:41:25 +0200	[thread overview]
Message-ID: <6514652d3a32d3ed33d6eb5c91d0af63bf0d1a0c.1596544734.git.andreyknvl@google.com> (raw)
In-Reply-To: <cover.1596544734.git.andreyknvl@google.com>

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@intel.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 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


  parent reply	other threads:[~2020-08-04 12:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 12:41 [PATCH v2 0/5] kasan: support stack instrumentation for tag-based mode Andrey Konovalov
2020-08-04 12:41 ` [PATCH v2 1/5] kasan: don't tag stacks allocated with pagealloc Andrey Konovalov
2020-08-04 12:41 ` Andrey Konovalov [this message]
2020-08-04 12:45   ` [PATCH v2 2/5] efi: provide empty efi_enter_virtual_mode implementation Ard Biesheuvel
2020-08-04 12:41 ` [PATCH v2 3/5] kasan, arm64: don't instrument functions that enable kasan Andrey Konovalov
2020-08-04 13:19   ` Catalin Marinas
2020-08-04 13:24     ` Andrey Konovalov
2020-08-04 12:41 ` [PATCH v2 4/5] kasan: allow enabling stack tagging for tag-based mode Andrey Konovalov
2020-08-04 12:41 ` [PATCH v2 5/5] kasan: adjust kasan_stack_oob " Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6514652d3a32d3ed33d6eb5c91d0af63bf0d1a0c.1596544734.git.andreyknvl@google.com \
    --to=andreyknvl@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=lenaptr@google.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=nivedita@alum.mit.edu \
    --cc=vincenzo.frascino@arm.com \
    --cc=walter-zh.wu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).