From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from matoro.tk (matoro.tk [104.188.251.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 566397A for ; Mon, 8 Aug 2022 18:42:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=waso6o/gLxP4dp0Ks9iZGKqqKBgpprYF0f4RtQrgunc=; c=relaxed/relaxed; d=matoro.tk; h=Subject:Subject:Sender:To:To:Cc:Cc:From:From:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:In-Reply-To:Message-Id:Message-Id:References:References:Autocrypt:Openpgp; i=@matoro.tk; s=20220801; t=1659984140; v=1; x=1660416140; b=tS3+PeZ4x7UIaxySNasrF1pt1JK67oV1k+KCwDmj0FfmR+DyxGPbcI2X7WphaJre39bKKqwz JHHhwd6oLizdTJV6NgyrpczO3SD7XlTVqVcnL6cgqepe3shMYX7p62lg0YJ6woTbii34nsJDrD5 eOQoNKpWsC53wCBzs6RWIliLnoZmrzDF3JWHVVJDnFd8fcDROSqJysd8cEFjOeQbsIfBr4UHFBo LIQy4Rrjwa83VBWrL5SQaq0DqHvDe/Ljgv3Fmr5cHjFz38Ijno+QJLZKzG49ext/5lgxMr5AteD bBy4oL/zOHYQqabEVQRyF+3ckZnlOKc3Nt9lK0PCScNiCt6vE7LmS1AFo4TOTbcC8GCyJ1mOe14 VmlPBMQGYi704VFuiifiMn3fuqXfLG/U0ibbkiv+VbNlq+vnrPV4vjOgRCpxukWJRM+uqWw0fju qFWmXfnvr2a7HOd3mDkz82Jj0hGCt0ES+LIDJLNXT8XTHqr6I+0gT/QFTQepnTUSJGzNyga1vR7 jhNBDKOx0VrX50J+vk9fA/Y6/LWH4b0FxNTTEbGYOpnU/xx8XgzcCC7CAH97X/9xFvExnep1m1R Db3PJZUJz6muhm1tsfdIvwbp0q3k3TOos2YGryFxa8NKfJudNsdYTachK2NbyBSBwpZHWAFH/+b SAD76p7mvNE= Received: by matoro.tk (envelope-sender ) with ESMTPS id d390d774; Mon, 08 Aug 2022 14:42:20 -0400 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Mon, 08 Aug 2022 14:42:20 -0400 From: matoro To: Masahiro Yamada Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Peter Zijlstra , linux-modules , clang-built-linux , Ard Biesheuvel , Sami Tolvanen Subject: Re: [PATCH v6 00/10] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h) In-Reply-To: References: <20220513113930.10488-1-masahiroy@kernel.org> <2c496d24174e63b27ec047f383df6700@matoro.tk> <38a9853e59db8946999316ce3a6b4621@matoro.tk> Message-ID: X-Sender: matoro_mailinglist_kernel@matoro.tk Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit That patch doesn't apply to the v5.19 stable tag, so I just manually edited and it worked perfect! Thank you!! Sorry I didn't mention that warning - I did see it, but it still showed up even on the old kernel, so I thought it was irrelevant. Much appreciated! -------- Original Message -------- Subject: Re: [PATCH v6 00/10] kbuild: yet another series of cleanups (modpost, LTO, MODULE_REL_CRCS, export.h) Date: 2022-08-08 13:36 From: Masahiro Yamada To: matoro On Mon, Aug 8, 2022 at 10:27 PM matoro 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 ?\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" : "");