Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

DISCUSSION Stephen Rothwell 5 participants 15 messages Nov 24, 2025 – Nov 25, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "NULL" [drivers/gpu/nova-core/nova_core.ko] undefined!

Caused by commit

c5d913fabb57 ("x86/bug: Add BUG_FORMAT basics")

I have used the tip tree from next-20251121 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "NULL" [drivers/gpu/nova-core/nova_core.ko] undefined!

Rust :/

So I have:

$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$

Help ?!?

#2 lore raw
Quoted 13 lines · Peter Zijlstra
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "NULL" [drivers/gpu/nova-core/nova_core.ko] undefined!

Rust :/

So I have:

Quoted 8 lines
$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$

Help ?!?

[CC nova]

On my system it seems that RANDSTRUCT=y prevents the enabling of RUST, but I'm sure Danilo and Alexandre have better ideas about how to enable nova-core.

Regards,
Boqun

#3 lore raw
Quoted 20 lines · Boqun Feng
Quoted 19 lines · Peter Zijlstra
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "NULL" [drivers/gpu/nova-core/nova_core.ko] undefined!

Rust :/

So I have:

$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$
Quoted 8 lines
Quoted 2 lines

Help ?!?

[CC nova]

On my system it seems that RANDSTRUCT=y prevents the enabling of RUST, but I'm sure Danilo and Alexandre have better ideas about how to enable nova-core.

Ah, indeed, RANDSTRUCT seems to be messing things up. I tried disabling that, but then I need to manually enable random crap to get Nova happy and menuconfig isn't very nice.

I really don't think rustavailable is doing a good job here. Strictly speaking yes, its available, but figuring out why things don't work is a giant pain in the arse.

Now, lets see if frobbing Kconfig to disqualify RANDSTRUCT will let allmodconfig work better.

#4 lore raw
Quoted 34 lines · Peter Zijlstra
Quoted 20 lines · Boqun Feng
Quoted 19 lines · Peter Zijlstra
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: modpost: "NULL" [drivers/gpu/nova-core/nova_core.ko] undefined!

Rust :/

So I have:

$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$
Quoted 8 lines
Quoted 2 lines

Help ?!?

[CC nova]

On my system it seems that RANDSTRUCT=y prevents the enabling of RUST, but I'm sure Danilo and Alexandre have better ideas about how to enable nova-core.

Ah, indeed, RANDSTRUCT seems to be messing things up. I tried disabling that, but then I need to manually enable random crap to get Nova happy and menuconfig isn't very nice.

Quoted 6 lines

I really don't think rustavailable is doing a good job here. Strictly speaking yes, its available, but figuring out why things don't work is a giant pain in the arse.

Now, lets see if frobbing Kconfig to disqualify RANDSTRUCT will let allmodconfig work better.

This... ok now lets see wtf the actual problem is.

security/Kconfig.hardening +1 -0
index 86f8768c63d4..4a5890796ac2 100644
@@ -282,6 +282,7 @@ config CC_HAS_RANDSTRUCT
 	# Randstruct was first added in Clang 15, but it isn't safe to use until
 	# Clang 16 due to https://github.com/llvm/llvm-project/issues/60349
 	depends on !CC_IS_CLANG || CLANG_VERSION >= 160000
+	depends on BROKEN
 
 choice
 	prompt "Randomize layout of sensitive kernel structures"
#5 lore raw
Quoted 1 line · Peter Zijlstra

This... ok now lets see wtf the actual problem is.

This cures it. I'll go rebase that tree.

arch/x86/include/asm/bug.h +1 -1
index a3dd6805b574..d0a96ff5c02c 100644
@@ -104,7 +104,7 @@ do {									\
 
 #define ARCH_WARN_ASM(file, line, flags, size)				\
 	"1:\t " ASM_UD2 "\n"						\
-	_BUG_FLAGS_ASM("NULL", file, line, flags, size, "")
+	_BUG_FLAGS_ASM("0", file, line, flags, size, "")
 
 #else
 
#6 lore raw

Hi Peter,

Quoted 12 lines · On Mon, 24 Nov 2025 20:19:03 +0100 Peter Zijlstra <[email protected]> wrote:
Quoted 1 line · Peter Zijlstra

This... ok now lets see wtf the actual problem is.

This cures it. I'll go rebase that tree.

arch/x86/include/asm/bug.h +0 -0
index a3dd6805b574..d0a96ff5c02c 100644

arch/x86/include/asm/bug.h do { \ · line 110

Quoted 8 lines
arch/x86/include/asm/bug.h +1 -1
@@ -104,7 +104,7 @@ do {									\
 
 #define ARCH_WARN_ASM(file, line, flags, size)				\
 	"1:\t " ASM_UD2 "\n"						\
-	_BUG_FLAGS_ASM("NULL", file, line, flags, size, "")
+	_BUG_FLAGS_ASM("0", file, line, flags, size, "")
 
 #else
 

I applied that by hand to the tip tree merge today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#7 lore raw
In reply to Peter Zijlstra
Quoted 4 lines · Peter Zijlstra

I really don't think rustavailable is doing a good job here. Strictly speaking yes, its available, but figuring out why things don't work is a giant pain in the arse.

I guess rusttoolchainavailable would have been a better name, i.e. it is only about the toolchain, not about the kernel config requirements:

rustavailable - Checks whether the Rust toolchain is
available and, if not, explains why.

Quoted 2 lines

Now, lets see if frobbing Kconfig to disqualify RANDSTRUCT will let allmodconfig work better.

By the way, I have had this patch around for RANDSTRUCT a long time:

    https://lore.kernel.org/rust-for-linux/[email protected]/

More than glad if someone confirms it works for them...

Cheers,
Miguel

#9 lore raw
Quoted 11 lines · Peter Zijlstra
Quoted 7 lines · Miguel Ojeda

On Mon, Nov 24, 2025 at 3:47 PM Peter Zijlstra <[email protected]> wrote:

By the way, I have had this patch around for RANDSTRUCT a long time:

    https://lore.kernel.org/rust-for-linux/[email protected]/

More than glad if someone confirms it works for them...

/me mumbles something about using clang to inject C IR into the Rust thing and kicking bindgen to the curb :-)

FWIW it might be relatively simple to abuse precompiled headers for this. Generate the pch files using clang and the normal linux build flags, then let rust do something like:

unsafe extern "C" include "header.h.pch"

or whatever fits the syntax best -- some day I'll get around to learning this thing.

That way you can fairly trivially inject AST/IR from another language -- including all the inline functions and inline asm bits.

#10 lore raw
In reply to Peter Zijlstra

Hi Peter,

Quoted 5 lines · On Mon, 24 Nov 2025 13:32:49 +0100 Peter Zijlstra <[email protected]> wrote:

Rust :/

So I have:

Quoted 7 lines
$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$

Help ?!?

Have you read Documentation/rust/quick-start.rst? I am using Debian Stable and have the necessary stuff installed and a "make allmodconfig" is sufficient. Fedora 42 or 43 should also be fine.

$ grep -e CONFIG_RUST= -e CONFIG_NOVA= .config
CONFIG_RUST=y
$ grep -e CONFIG_RUST= -e CONFIG_NOVA_CORE= .config
CONFIG_RUST=y
CONFIG_NOVA_CORE=m
$ grep -e CONFIG_RUST .configCONFIG_RUSTC_VERSION=108500
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=190107
CONFIG_RUSTC_HAS_SLICE_AS_FLATTENED=y
CONFIG_RUSTC_HAS_COERCE_POINTEE=y
CONFIG_RUST=y
CONFIG_RUSTC_VERSION_TEXT="rustc 1.85.0 (4d91de4e4 2025-02-17) (built from a source tarball)"
CONFIG_RUST_FW_LOADER_ABSTRACTIONS=y
CONFIG_RUST_PWM_ABSTRACTIONS=y
CONFIG_RUST_BITMAP_HARDENED=y
CONFIG_RUST_DEBUG_ASSERTIONS=y
CONFIG_RUST_OVERFLOW_CHECKS=y
CONFIG_RUST_BUILD_ASSERT_ALLOW=y
Signature · 2 lines
Cheers,
Stephen Rothwell
#11 lore raw
Quoted 14 lines · Stephen Rothwell

Hi Peter,

Quoted 11 lines · On Mon, 24 Nov 2025 13:32:49 +0100 Peter Zijlstra <[email protected]> wrote:

Rust :/

So I have:

$ make O=tmp-build LLVM=-22 allmodconfig
$ make O=tmp-build LLVM=-22 rustavailable
Rust is available!
$ grep -e CONFIG_RUST= -e CONFIG_NOVA= tmp-build/.config
$
Quoted 3 lines
Quoted 1 line

Help ?!?

Have you read Documentation/rust/quick-start.rst?

At some point in the past... I just did again, and updated the relevant packages and rustavailable is still green, but allmodconfig is still not giving me rust.

I'm on Debian Testing.

#12 lore raw
Quoted 6 lines · Peter Zijlstra

At some point in the past... I just did again, and updated the relevant packages and rustavailable is still green, but allmodconfig is still not giving me rust.

I'm on Debian Testing.

There are several depends on for CONFIG_RUST as Boqun mentions, so it is likely one of those is blocking you.

The easiest way to know which one it is is to check what menuconfig computes about the requirements (searching with the / command).

Happy to help if that doesn't solve it.

Cheers,
Miguel

#13 lore raw
Quoted 6 lines · Miguel Ojeda
Quoted 5 lines · Peter Zijlstra

At some point in the past... I just did again, and updated the relevant packages and rustavailable is still green, but allmodconfig is still not giving me rust.

Quoted 7 lines
Quoted 1 line

I'm on Debian Testing.

There are several depends on for CONFIG_RUST as Boqun mentions, so it is likely one of those is blocking you.

The easiest way to know which one it is is to check what menuconfig computes about the requirements (searching with the / command).

Yeah, that output is so long it scrolls out of the right side of the screen and it really isn't nice to read with all the negations.

#14 lore raw
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Miguel Ojeda
Quoted 6 lines · Peter Zijlstra

At some point in the past... I just did again, and updated the relevant packages and rustavailable is still green, but allmodconfig is still not giving me rust.

I'm on Debian Testing.

Quoted 9 lines
Quoted 5 lines

There are several depends on for CONFIG_RUST as Boqun mentions, so it is likely one of those is blocking you.

The easiest way to know which one it is is to check what menuconfig computes about the requirements (searching with the / command).

Yeah, that output is so long it scrolls out of the right side of the screen and it really isn't nice to read with all the negations.

I've always found xconfig better for seeing dependencies. Of course, that also adds a few build requirements.

Signature · 1 line
~Randy