x86 ThinLTO: BUG: unable to handle page fault

17 views
Skip to first unread message

Victor MICHEL

unread,
Feb 25, 2021, 9:11:29 PM2/25/21
to clang-bu...@googlegroups.com
Hello,

I've been trying the recently-merged LTO patches on x86, but it
consistently trips a BUG when I try to load my wifi driver (iwlwifi):
BUG: unable to handle page fault for address: 0000000200000000
The rest seems to work fine.

The kernel was built from Linus' tree at commit 2c87f7a38f93.
I cannot reproduce when compiling the same kernel without ThinLTO.

I attached the full backtrace & kernel config - happy to provide more
info / try things out if needed!

Cheers,

Victor
.config.gz
dmesg.out

Nathan Chancellor

unread,
Feb 25, 2021, 9:58:12 PM2/25/21
to Victor MICHEL, clang-bu...@googlegroups.com
Thanks for the report!

Does the below diff resolve it for you? Taking a stab in the dark.

Cheers,
Nathan

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 15e2773ce7e7..9d0cceee76b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1083,6 +1083,7 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek COMPUTER INC."),
},
},
+ { /* Terminating entry */ }
};

static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)

Victor MICHEL

unread,
Feb 25, 2021, 10:37:50 PM2/25/21
to Nathan Chancellor, clang-bu...@googlegroups.com
Thanks! Ah, I really should've looked for more than 5 seconds - yes,
that resolves it

Looks like a patch was already sent to linux-wireless:
https://lore.kernel.org/linux-wireless/20210223140039.170...@huawei.com/

Sorry for the noise, and thanks :)

Victor

Nick Desaulniers

unread,
Feb 26, 2021, 3:44:22 PM2/26/21
to Victor MICHEL, Nathan Chancellor, clang-built-linux
On Thu, Feb 25, 2021 at 7:37 PM Victor MICHEL <vic.mic...@gmail.com> wrote:
>
> Thanks! Ah, I really should've looked for more than 5 seconds - yes,
> that resolves it
>
> Looks like a patch was already sent to linux-wireless:
> https://lore.kernel.org/linux-wireless/20210223140039.170...@huawei.com/

You and Nathan should provide reviewed-by/tested-by tags for that,
directions at the bottom of that link on how to reply, just add the
Subject line to the top of an empty file with `Re: ` inserted and you
should be able to reply from the command line. Linux needs testers
like yourself to help provide this valuable feedback!

>
> Sorry for the noise, and thanks :)
>
> Victor
>
>
> On Thu, Feb 25, 2021 at 6:58 PM Nathan Chancellor <nat...@kernel.org> wrote:
> >
> > On Thu, Feb 25, 2021 at 06:11:16PM -0800, Victor MICHEL wrote:
> > > Hello,
> > >
> > > I've been trying the recently-merged LTO patches on x86, but it
> > > consistently trips a BUG when I try to load my wifi driver (iwlwifi):
> > > BUG: unable to handle page fault for address: 0000000200000000
> > > The rest seems to work fine.
> > >
> > > The kernel was built from Linus' tree at commit 2c87f7a38f93.
> > > I cannot reproduce when compiling the same kernel without ThinLTO.

Cool, thanks for taking the time to test this, and report the observed failure!

> > >
> > > I attached the full backtrace & kernel config - happy to provide more
> > > info / try things out if needed!
> > >
> > > Cheers,
> > >
> > > Victor
> > >
> >
> > Thanks for the report!
> >
> > Does the below diff resolve it for you? Taking a stab in the dark.

Hey, looks just like the patch in -next, great intuition and thanks
for taking a look!

> >
> > Cheers,
> > Nathan
> >
> > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > index 15e2773ce7e7..9d0cceee76b8 100644
> > --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > @@ -1083,6 +1083,7 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
> > DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek COMPUTER INC."),
> > },
> > },
> > + { /* Terminating entry */ }
> > };
> >
> > static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
>
> --
--
Thanks,
~Nick Desaulniers
Reply all
Reply to author
Forward
0 new messages