All of lore.kernel.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: rdunlap@infradead.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, Conor Dooley <conor@kernel.org>
Subject: Re: linux-next: Tree for Jul 6 (arch/riscv/)
Date: Thu, 06 Jul 2023 14:46:50 -0700 (PDT)	[thread overview]
Message-ID: <mhng-6e5d4a84-8aef-406d-b0cd-8f195f531354@palmer-ri-x1c9a> (raw)
In-Reply-To: <62e993a5-0bb4-40dc-6399-f60525300a6c@infradead.org>

On Thu, 06 Jul 2023 14:36:05 PDT (-0700), rdunlap@infradead.org wrote:
>
>
> On 7/6/23 14:32, Palmer Dabbelt wrote:
>> On Thu, 06 Jul 2023 14:27:53 PDT (-0700), rdunlap@infradead.org wrote:
>>>
>>>
>>> On 7/5/23 18:57, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Please do *not* add any v6.6 related stuff to your linux-next included
>>>> branches until after v6.5-rc1 has been released.
>>>>
>>>> Changes since 20230705:
>>>>
>>>
>>> on riscv64:
>>>
>>> WARNING: modpost: vmlinux: section mismatch in reference: $xrv64i2p1_m2p0_a2p1_zicsr2p0_zifencei2p0_zihintpause2p0_zmmul1p0+0x14 (section: .text.unlikely.set_bit.constprop.0) -> numa_nodes_parsed (section: .init.data)
>>>
>>>
>>> Full randconfig file is attached.
>>
>> Thanks, I'm giving it a look.  Do you happen to also have your toolchain version easily availiable?  The mapping symbols are new and we've seen some odd stuff happen, something is likely broken somewhere...
>
> I'm using gcc-13.1.0 from  https://mirrors.edge.kernel.org/pub/tools/crosstool/

Cool, those are pretty easy to run.  I've yet to actually reproduce the
failures, but I'd guess we just want to ignore the mapping symbols with
something like

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b29b29707f10..2f801469301d 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -614,6 +614,18 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
 		/* Expoline thunks are linked on all kernel modules during final link of .ko */
 		if (strstarts(symname, "__s390_indirect_jump_r"))
 			return 1;
+
+	/*
+	 * RISC-V defines various special symbols that start with "$".  The
+	 * mapping symbols, which exist to differentiate between incompatible
+	 * instruction encodings when disassembling, show up all over the place
+	 * and are generally not meant to be treated like other symbols.  So
+	 * just ignore any of the special symbols.
+	 */
+	if (info->hdr->e_machine == EM_RISCV)
+		if (symname[0] == '$')
+			return 1;
+
 	/* Do not ignore this symbol */
 	return 0;
 }

I haven't even built that, though...

These also trip up backtraces, so we probably need something over there as
well.

WARNING: multiple messages have this Message-ID (diff)
From: Palmer Dabbelt <palmer@dabbelt.com>
To: rdunlap@infradead.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, Conor Dooley <conor@kernel.org>
Subject: Re: linux-next: Tree for Jul 6 (arch/riscv/)
Date: Thu, 06 Jul 2023 14:46:50 -0700 (PDT)	[thread overview]
Message-ID: <mhng-6e5d4a84-8aef-406d-b0cd-8f195f531354@palmer-ri-x1c9a> (raw)
In-Reply-To: <62e993a5-0bb4-40dc-6399-f60525300a6c@infradead.org>

On Thu, 06 Jul 2023 14:36:05 PDT (-0700), rdunlap@infradead.org wrote:
>
>
> On 7/6/23 14:32, Palmer Dabbelt wrote:
>> On Thu, 06 Jul 2023 14:27:53 PDT (-0700), rdunlap@infradead.org wrote:
>>>
>>>
>>> On 7/5/23 18:57, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Please do *not* add any v6.6 related stuff to your linux-next included
>>>> branches until after v6.5-rc1 has been released.
>>>>
>>>> Changes since 20230705:
>>>>
>>>
>>> on riscv64:
>>>
>>> WARNING: modpost: vmlinux: section mismatch in reference: $xrv64i2p1_m2p0_a2p1_zicsr2p0_zifencei2p0_zihintpause2p0_zmmul1p0+0x14 (section: .text.unlikely.set_bit.constprop.0) -> numa_nodes_parsed (section: .init.data)
>>>
>>>
>>> Full randconfig file is attached.
>>
>> Thanks, I'm giving it a look.  Do you happen to also have your toolchain version easily availiable?  The mapping symbols are new and we've seen some odd stuff happen, something is likely broken somewhere...
>
> I'm using gcc-13.1.0 from  https://mirrors.edge.kernel.org/pub/tools/crosstool/

Cool, those are pretty easy to run.  I've yet to actually reproduce the
failures, but I'd guess we just want to ignore the mapping symbols with
something like

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index b29b29707f10..2f801469301d 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -614,6 +614,18 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
 		/* Expoline thunks are linked on all kernel modules during final link of .ko */
 		if (strstarts(symname, "__s390_indirect_jump_r"))
 			return 1;
+
+	/*
+	 * RISC-V defines various special symbols that start with "$".  The
+	 * mapping symbols, which exist to differentiate between incompatible
+	 * instruction encodings when disassembling, show up all over the place
+	 * and are generally not meant to be treated like other symbols.  So
+	 * just ignore any of the special symbols.
+	 */
+	if (info->hdr->e_machine == EM_RISCV)
+		if (symname[0] == '$')
+			return 1;
+
 	/* Do not ignore this symbol */
 	return 0;
 }

I haven't even built that, though...

These also trip up backtraces, so we probably need something over there as
well.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-07-06 21:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  1:57 linux-next: Tree for Jul 6 Stephen Rothwell
2023-07-06 21:07 ` linux-next: Tree for Jul 6 [drivers/vdpa/pds/pds_vdpa.ko] Randy Dunlap
2023-07-06 21:07   ` Randy Dunlap
2023-07-06 22:26   ` Shannon Nelson via Virtualization
2023-07-06 22:26     ` Shannon Nelson
2023-07-06 21:27 ` linux-next: Tree for Jul 6 (arch/riscv/) Randy Dunlap
2023-07-06 21:27   ` Randy Dunlap
2023-07-06 21:32   ` Palmer Dabbelt
2023-07-06 21:32     ` Palmer Dabbelt
2023-07-06 21:36     ` Randy Dunlap
2023-07-06 21:36       ` Randy Dunlap
2023-07-06 21:46       ` Palmer Dabbelt [this message]
2023-07-06 21:46         ` Palmer Dabbelt
2023-07-06 23:40         ` Randy Dunlap
2023-07-06 23:40           ` Randy Dunlap
2023-07-07  5:47           ` Palmer Dabbelt
2023-07-07  5:47             ` Palmer Dabbelt

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=mhng-6e5d4a84-8aef-406d-b0cd-8f195f531354@palmer-ri-x1c9a \
    --to=palmer@dabbelt.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=paul.walmsley@sifive.com \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.