anthraxx / linux-hardened

Minimal supplement to upstream Kernel Self Protection Project changes. Features already provided by SELinux + Yama and archs other than multiarch arm64 / x86_64 aren't in scope. Only tags have stable history. Shared IRC channel with KSPP: irc.libera.chat #linux-hardening
Other
554 stars 55 forks source link

CONFIG_DEBUG_VIRTUAL breaking amdgpu #91

Closed valoq closed 4 months ago

valoq commented 5 months ago

After upgrading linux-hardened to version 6.7 the kernel would seem to crash at an early boot stage. Setting nomodeset or blacklisting amdgpu would solve the issue and allow the kernel to boot, however there were no useful logs about a possible cause in the journal.

After playing around with the config settings, it turned out that setting CONFIG_DEBUG_VIRTUAL=y would cause the issue to trigger. Removing CONFIG_DEBUG_VIRTUAL from the config file solved the problem for now and allows the kernel to boot with the amdgpu module.

The issue is not strictly related to linux-hardened itself and setting CONFIG_DEBUG_VIRTUAL=y on vanilla kernel causes the same problem (normally not present in vanilla config). Having this option present in linux 6.6 did not trigger the issue.

I recreated the problem booting from a fresh archiso to rule out any local settigns as the cause, therefore the issue seems to be related to the amdgpu module or the specific card model (Radeon RX 5000 series)

Until the bug is solved upstream, disabling CONFIG_DEBUG_VIRTUAL could solve the issue for anyone affected by this.

me0mar commented 5 months ago

After upgrading linux-hardened to version 6.7 the kernel would seem to crash at an early boot stage. Setting nomodeset or blacklisting amdgpu would solve the issue and allow the kernel to boot, however there were no useful logs about a possible cause in the journal.

After playing around with the config settings, it turned out that setting CONFIG_DEBUG_VIRTUAL=y would cause the issue to trigger. Removing CONFIG_DEBUG_VIRTUAL from the config file solved the problem for now and allows the kernel to boot with the amdgpu module.

The issue is not strictly related to linux-hardened itself and setting CONFIG_DEBUG_VIRTUAL=y on vanilla kernel causes the same problem (normally not present in vanilla config). Having this option present in linux 6.6 did not trigger the issue.

I recreated the problem booting from a fresh archiso to rule out any local settigns as the cause, therefore the issue seems to be related to the amdgpu module or the specific card model (Radeon RX 5000 series)

Until the bug is solved upstream, disabling CONFIG_DEBUG_VIRTUAL could solve the issue for anyone affected by this.

The issue persists on the Ryzen 3400G APU even after disabling CONFIG_DEBUG_VIRTUAL.

Beneter commented 5 months ago

I am also facing the same issue and modifying CONFIG_DEBUG_VIRTUAL unfortunately has no effect.

wommel commented 5 months ago

I'm also having crashes upon AMDGPU load on a Ryzen 3 2200GE but two other machines with similar software setup but different AMD graphics do work fine.

anthraxx commented 5 months ago

This is likely a vanilla kernel bug, please try to reproduce this issue with a vanilla kernel while using the hardened Kconfig and report this issue upstream to get it resolved. It is a good idea to coordinate this here, but ultimately this needs to be fixed upstream and not in hardened.

valoq commented 4 months ago

This issues has been fixed starting with kernel version 6.7.9