diff mbox series

linux-yocto: Remove debug-kernel.scc for riscv32 kernels

Message ID 20250524035958.3809327-1-raj.khem@gmail.com
State New
Headers show
Series linux-yocto: Remove debug-kernel.scc for riscv32 kernels | expand

Commit Message

Khem Raj May 24, 2025, 3:59 a.m. UTC
modpost fails to process the debug location lists for riscv32

| ERROR: modpost: vmlinux: local symbol '__asm_copy_to_user' was exported
| ERROR: modpost: vmlinux: local symbol '__asm_copy_from_user' was exported
| ERROR: modpost: vmlinux: local symbol '__clear_user' was exported
| ERROR: modpost: vmlinux: local symbol 'xor_regs_2_' was exported
| ERROR: modpost: vmlinux: local symbol 'xor_regs_3_' was exported
| ERROR: modpost: vmlinux: local symbol 'xor_regs_4_' was exported
| ERROR: modpost: vmlinux: local symbol 'xor_regs_5_' was exported
| WARNING: modpost: vmlinux: section mismatch in reference: 0x1560 (section: __ex_table) -> .LASF464 (section: .debug_str)
| ERROR: modpost: __ex_table+0x1560 references non-executable section '.debug_str'

poky adds features/debug/debug-kernel.scc via distro policy and hence
the builds are failing for qemuriscv32 on AB. While this should be
fixed in kernel build system or tools, this makes us proceed until
then

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 meta/recipes-kernel/linux/linux-yocto_6.12.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Bruce Ashfield May 24, 2025, 4:12 a.m. UTC | #1
On Sat, May 24, 2025 at 12:00 AM Khem Raj <raj.khem@gmail.com> wrote:

> modpost fails to process the debug location lists for riscv32
>
> | ERROR: modpost: vmlinux: local symbol '__asm_copy_to_user' was exported
> | ERROR: modpost: vmlinux: local symbol '__asm_copy_from_user' was exported
> | ERROR: modpost: vmlinux: local symbol '__clear_user' was exported
> | ERROR: modpost: vmlinux: local symbol 'xor_regs_2_' was exported
> | ERROR: modpost: vmlinux: local symbol 'xor_regs_3_' was exported
> | ERROR: modpost: vmlinux: local symbol 'xor_regs_4_' was exported
> | ERROR: modpost: vmlinux: local symbol 'xor_regs_5_' was exported
> | WARNING: modpost: vmlinux: section mismatch in reference: 0x1560
> (section: __ex_table) -> .LASF464 (section: .debug_str)
> | ERROR: modpost: __ex_table+0x1560 references non-executable section
> '.debug_str'
>
> poky adds features/debug/debug-kernel.scc via distro policy and hence
> the builds are failing for qemuriscv32 on AB. While this should be
> fixed in kernel build system or tools, this makes us proceed until
> then

The question is .. how will we ever know to revisit this ? Can we raise a
bug
To track that this needs to be reenabled later ?

Bruce


>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
> ---
>  meta/recipes-kernel/linux/linux-yocto_6.12.bb | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-yocto_6.12.bb
> b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
> index fefed8c9c53..83be9fed428 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_6.12.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
> @@ -72,5 +72,8 @@ KERNEL_FEATURES:append = "
> ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " cg
>  KERNEL_FEATURES:append:powerpc = " arch/powerpc/powerpc-debug.scc"
>  KERNEL_FEATURES:append:powerpc64 = " arch/powerpc/powerpc-debug.scc"
>  KERNEL_FEATURES:append:powerpc64le = " arch/powerpc/powerpc-debug.scc"
> -
> +# Do not add debug info for riscv32, it fails during depmod
> +# ERROR: modpost: __ex_table+0x17a4 references non-executable section
> '.debug_loclists'
> +# Check again during next major version upgrade
> +KERNEL_FEATURES:remove:riscv32 = "features/debug/debug-kernel.scc"
>  INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
>
Khem Raj May 24, 2025, 4:50 a.m. UTC | #2
On Fri, May 23, 2025 at 9:12 PM Bruce Ashfield via
lists.openembedded.org
<bruce.ashfield=gmail.com@lists.openembedded.org> wrote:
>
>
>
> On Sat, May 24, 2025 at 12:00 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> modpost fails to process the debug location lists for riscv32
>>
>> | ERROR: modpost: vmlinux: local symbol '__asm_copy_to_user' was exported
>> | ERROR: modpost: vmlinux: local symbol '__asm_copy_from_user' was exported
>> | ERROR: modpost: vmlinux: local symbol '__clear_user' was exported
>> | ERROR: modpost: vmlinux: local symbol 'xor_regs_2_' was exported
>> | ERROR: modpost: vmlinux: local symbol 'xor_regs_3_' was exported
>> | ERROR: modpost: vmlinux: local symbol 'xor_regs_4_' was exported
>> | ERROR: modpost: vmlinux: local symbol 'xor_regs_5_' was exported
>> | WARNING: modpost: vmlinux: section mismatch in reference: 0x1560 (section: __ex_table) -> .LASF464 (section: .debug_str)
>> | ERROR: modpost: __ex_table+0x1560 references non-executable section '.debug_str'
>>
>> poky adds features/debug/debug-kernel.scc via distro policy and hence
>> the builds are failing for qemuriscv32 on AB. While this should be
>> fixed in kernel build system or tools, this makes us proceed until
>> then
>
> The question is .. how will we ever know to revisit this ? Can we raise a bug
> To track that this needs to be reenabled later ?
>

I plan to open a tracker on - https://bugzilla.yoctoproject.org/
once its back online, but more importantly I am going to raise it in
riscv kernel community once
I have narrowed it a bit down.

> Bruce
>
>>
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
>> ---
>>  meta/recipes-kernel/linux/linux-yocto_6.12.bb | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/linux/linux-yocto_6.12.bb b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
>> index fefed8c9c53..83be9fed428 100644
>> --- a/meta/recipes-kernel/linux/linux-yocto_6.12.bb
>> +++ b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
>> @@ -72,5 +72,8 @@ KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " cg
>>  KERNEL_FEATURES:append:powerpc = " arch/powerpc/powerpc-debug.scc"
>>  KERNEL_FEATURES:append:powerpc64 = " arch/powerpc/powerpc-debug.scc"
>>  KERNEL_FEATURES:append:powerpc64le = " arch/powerpc/powerpc-debug.scc"
>> -
>> +# Do not add debug info for riscv32, it fails during depmod
>> +# ERROR: modpost: __ex_table+0x17a4 references non-executable section '.debug_loclists'
>> +# Check again during next major version upgrade
>> +KERNEL_FEATURES:remove:riscv32 = "features/debug/debug-kernel.scc"
>>  INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#217221): https://lists.openembedded.org/g/openembedded-core/message/217221
> Mute This Topic: https://lists.openembedded.org/mt/113276800/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/linux-yocto_6.12.bb b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
index fefed8c9c53..83be9fed428 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.12.bb
@@ -72,5 +72,8 @@  KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " cg
 KERNEL_FEATURES:append:powerpc = " arch/powerpc/powerpc-debug.scc"
 KERNEL_FEATURES:append:powerpc64 = " arch/powerpc/powerpc-debug.scc"
 KERNEL_FEATURES:append:powerpc64le = " arch/powerpc/powerpc-debug.scc"
-
+# Do not add debug info for riscv32, it fails during depmod
+# ERROR: modpost: __ex_table+0x17a4 references non-executable section '.debug_loclists'
+# Check again during next major version upgrade
+KERNEL_FEATURES:remove:riscv32 = "features/debug/debug-kernel.scc"
 INSANE_SKIP:kernel-vmlinux:qemuppc64 = "textrel"