From: Arvind Sankar <nivedita@alum.mit.edu>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
linux-efi@vger.kernel.org, Dmitry Vyukov <dvyukov@google.com>,
Alexander Potapenko <glider@google.com>,
kasan-dev <kasan-dev@googlegroups.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
kbuild-all@lists.01.org, Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [hnaz-linux-mm:master 168/421] init/main.c:1012: undefined reference to `efi_enter_virtual_mode'
Date: Mon, 3 Aug 2020 14:03:58 -0400 [thread overview]
Message-ID: <20200803180358.GA1299225@rani.riverdale.lan> (raw)
In-Reply-To: <CAAeHK+zbBF0YVveGNZo0bJ8fWHVZRcrr6n90eYLDCov2vcfZyg@mail.gmail.com>
On Mon, Aug 03, 2020 at 05:37:32PM +0200, Andrey Konovalov wrote:
> On Sun, Aug 2, 2020 at 12:25 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree: https://github.com/hnaz/linux-mm master
> > head: 2932a9e66c580f3c8d95ec27716d437198fb4c94
> > commit: 7c0265f304de3c3acd02d0015b56a076357bcce3 [168/421] kasan, arm64: don't instrument functions that enable kasan
> > config: x86_64-randconfig-r036-20200802 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
> > reproduce (this is a W=1 build):
> > git checkout 7c0265f304de3c3acd02d0015b56a076357bcce3
> > # save the attached .config to linux build tree
> > make W=1 ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> > ld: init/main.o: in function `start_kernel':
> > >> init/main.c:1012: undefined reference to `efi_enter_virtual_mode'
>
> Hm, I can reproduce the issue, but I don't understand why it happens.
>
> +EFI and KASAN people, maybe someone has an idea.
>
> This is the guilty patch:
>
> https://github.com/hnaz/linux-mm/commit/7c0265f304de3c3acd02d0015b56a076357bcce3
>
> The issue is only with efi_enter_virtual_mode() AFAIU, not with any of
> the other functions.
>
> Thanks!
>
After adding __no_sanitize_address, gcc doesn't inline efi_enabled() on
a KASAN build, even when CONFIG_EFI is disabled, and the function is
just
return false;
and so it isn't optimizing out the call to efi_enter_virtual_mode().
Making efi_enabled() __always_inline fixes this, but not sure if that is
the correct fix?
next prev parent reply other threads:[~2020-08-03 18:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 22:25 [hnaz-linux-mm:master 168/421] init/main.c:1012: undefined reference to `efi_enter_virtual_mode' kernel test robot
2020-08-03 15:37 ` Andrey Konovalov
2020-08-03 18:03 ` Arvind Sankar [this message]
2020-08-04 12:27 ` Andrey Konovalov
2020-08-04 12:40 ` Ard Biesheuvel
2020-08-04 12:44 ` 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=20200803180358.GA1299225@rani.riverdale.lan \
--to=nivedita@alum.mit.edu \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=ardb@kernel.org \
--cc=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hannes@cmpxchg.org \
--cc=kasan-dev@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.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).