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-next>] [day] [month] [year] [list]
Date:   Tue, 9 Aug 2022 02:36:41 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     matoro <matoro_mailinglist_kernel@...oro.tk>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-modules <linux-modules@...r.kernel.org>,
        clang-built-linux <llvm@...ts.linux.dev>,
        Ard Biesheuvel <ardb@...nel.org>,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH v6 00/10] kbuild: yet another series of cleanups (modpost,
 LTO, MODULE_REL_CRCS, export.h)

On Mon, Aug 8, 2022 at 10:27 PM matoro
<matoro_mailinglist_kernel@...oro.tk> wrote:
>
> I have real hardware for all these arches in my collection.  I use it
> for testing the latest kernel and toolchains on as many of the
> less-popular arches as possible, exactly to find issues like this one :)
>
> Specifically we support all of these in Gentoo.  To double-check this
> wasn't a config issue, I asked another user who also runs sparc to try
> building 5.19 with his config (not copying mine), and he observed the
> same problem.  You can reach us in #gentoo-sparc on Libera.
>
> As for testing, I make all this hardware available on an as-needed
> basis.  So if you can't or don't want to fiddle with qemu, just let me
> know (email or IRC, same username on Libera), and I will get you direct
> access to my hardware.  Thanks!!


I found the root cause.

When I build the sparc kernel, I see a warning

WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation
failed, symbol will not be versioned.


Then, modpost missed to write out the entry.

With the following patch, you will be able to load the module.

I will send a patch with a proper commit log tomorrow. I need some sleep now.



diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 29474cee10b1..337bd36a890a 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2206,13 +2206,11 @@ static void add_exported_symbols(struct buffer
*buf, struct module *mod)
        /* record CRCs for exported symbols */
        buf_printf(buf, "\n");
        list_for_each_entry(sym, &mod->exported_symbols, list) {
-               if (!sym->crc_valid) {
+               if (!sym->crc_valid)
                        warn("EXPORT symbol \"%s\" [%s%s] version
generation failed, symbol will not be versioned.\n"
                             "Is \"%s\" prototyped in
<asm/asm-prototypes.h>?\n",
                             sym->name, mod->name, mod->is_vmlinux ? "" : ".ko",
                             sym->name);
-                       continue;
-               }

                buf_printf(buf, "SYMBOL_CRC(%s, 0x%08x, \"%s\");\n",
                           sym->name, sym->crc, sym->is_gpl_only ? "_gpl" : "");















-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ