Skip to contentSkip to conversation

Kernel panic, CONFIG_FIPS_SIGNATURE_SELFTEST, missing dependency

DISCUSSION Kernel.org Bugbot 2 participants 8 messages Apr 3, 2023 – Apr 5, 2023

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

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hello and good day!

I think I found a missing dependency.
In case of setting CONFIG_FIPS_SIGNATURE_SELFTEST, CONFIG_CRYPTO_SHA256 also needs to be set. But not as module. Failing to do so results in an early kernel panic during boot.

Tested on linux-6.1.12-gentoo and linux-6.1.19-gentoo.

Thanks,
sephora

View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c0
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)
#1 lore raw

Hi sephora,

Quoted 7 lines · Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hello and good day!

I think I found a missing dependency.
In case of setting CONFIG_FIPS_SIGNATURE_SELFTEST, CONFIG_CRYPTO_SHA256 also needs to be set. But not as module. Failing to do so results in an early kernel panic during boot.

Please tell us what the kernel panic message is.

Quoted 3 lines

Tested on linux-6.1.12-gentoo and linux-6.1.19-gentoo.

Have you tested this on a mainline kernel, without gentoo patches?

Does gentoo add any patches in this area?

Thanks.

Quoted 6 lines

Thanks,
sephora

View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c0
You can reply to this message to join the discussion.

Signature · 1 line
~Randy
#2 lore raw
In reply to Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hi Randy!

(In reply to Bugbot from comment #1)

Quoted 4 lines

Randy Dunlap <[email protected]> writes:

Please tell us what the kernel panic message is.

There is no message. I'm sorry. I just get a black screen.

I'm using EFI to boot my machine. And I can get some output if I enable 'earlycon=efifb' via CMDLINE.

The output stops at:
Console: colour dummy device 80x25
printk: console [tty0] enabled
printk: bootconsole [efifb0] disabled

At this point the machine freezes. No error message.

And when I set:
CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_ON_OOPS_VALUE=1 CONFIG_PANIC_TIMEOUT=-1

That gives me a reboot loop.

Quoted 5 lines

Have you tested this on a mainline kernel, without gentoo patches?

Does gentoo add any patches in this area?

Unfortunately I don't know if Gentoo is adding any patches that may affect this.

But I can confirm that the problem persists while using vanilla-sources for kernel 6.2.9.

Thanks,
sephora

Quoted 2 lines

Thanks.

View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c2
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)
#3 lore raw
Quoted 30 lines · Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hi Randy!

(In reply to Bugbot from comment #1)

Quoted 4 lines

Randy Dunlap <[email protected]> writes:

Please tell us what the kernel panic message is.

There is no message. I'm sorry. I just get a black screen.

I'm using EFI to boot my machine. And I can get some output if I enable 'earlycon=efifb' via CMDLINE.

The output stops at:
Console: colour dummy device 80x25
printk: console [tty0] enabled
printk: bootconsole [efifb0] disabled

At this point the machine freezes. No error message.

And when I set:
CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_ON_OOPS_VALUE=1 CONFIG_PANIC_TIMEOUT=-1

That gives me a reboot loop.

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

Have you tested this on a mainline kernel, without gentoo patches?

Does gentoo add any patches in this area?

Unfortunately I don't know if Gentoo is adding any patches that may affect this.

But I can confirm that the problem persists while using vanilla-sources for kernel 6.2.9.

Please put your kernel .config file on the bugzilla entry.

What makes you think that this is related to FIPS_SIGNATURE_SELFTEST?

thanks.

Signature · 1 line
~Randy
#4 lore raw

Hi again,

Quoted 18 lines · Randy Dunlap
Quoted 15 lines · Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hi Randy!

(In reply to Bugbot from comment #1)

Quoted 4 lines

Randy Dunlap <[email protected]> writes:

Please tell us what the kernel panic message is.

There is no message. I'm sorry. I just get a black screen.

I'm using EFI to boot my machine. And I can get some output if I enable 'earlycon=efifb' via CMDLINE.

Quoted 7 lines
Quoted 7 lines

The output stops at:
Console: colour dummy device 80x25
printk: console [tty0] enabled
printk: bootconsole [efifb0] disabled

At this point the machine freezes. No error message.

I can reproduce this or at least something very similar to it, but it doesn't matter if FIPS_SIGNATURE_SELFTEST is set or not.

Quoted 10 lines
Quoted 10 lines

And when I set:
CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_ON_OOPS_VALUE=1 CONFIG_PANIC_TIMEOUT=-1

That gives me a reboot loop.

Quoted 3 lines

Have you tested this on a mainline kernel, without gentoo patches?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Does gentoo add any patches in this area?

Unfortunately I don't know if Gentoo is adding any patches that may affect this.

But I can confirm that the problem persists while using vanilla-sources for kernel 6.2.9.

Please put your kernel .config file on the bugzilla entry.

I'll test with your .config file...

Quoted 1 line

What makes you think that this is related to FIPS_SIGNATURE_SELFTEST?

and still that question...

Signature · 1 line
~Randy
#6 lore raw
In reply to Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hi Randy!

I submitted an example config.
That config works fine for me, until I set:

CONFIG_FIPS_SIGNATURE_SELFTEST=y

And it starts working well again if I set:

CONFIG_FIPS_SIGNATURE_SELFTEST=y
CONFIG_CRYPTO_SHA256=y

That's why I think it is related to FIPS_SIGNATURE_SELFTEST.

Thanks,
sephora

View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c6
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)
#7 lore raw

[adding linux-crypto and dhowells]

Quoted 14 lines · Kernel.org Bugbot

o6irnndpcv7 writes via Kernel.org Bugzilla:

Hi Randy!

I submitted an example config.
That config works fine for me, until I set:

CONFIG_FIPS_SIGNATURE_SELFTEST=y

And it starts working well again if I set:

CONFIG_FIPS_SIGNATURE_SELFTEST=y
CONFIG_CRYPTO_SHA256=y

Quoted 8 lines

That's why I think it is related to FIPS_SIGNATURE_SELFTEST.

Thanks,
sephora

View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c6
You can reply to this message to join the discussion.

I'm not making any progress on this bug, so asking others for help.

Is there anything in the FIPS_SIGNATURE_SELFTEST code (selftest.c) or code that it calls that requires CRYPTO_SHA256?

Signature · 1 line
~Randy