Skip to contentSkip to conversation

linux-image-amd64: Kernel Panic: copy_fpstate_to_sigfrane crashes.

DISCUSSION Ben Hutchings 4 participants 7 messages Apr 25, 2025 – May 9, 2025 4 messages not in the archive Regressions

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hi Aruna,

Commit ae6012d72fa6 "x86/pkeys: Ensure updated PKRU value is XRSTOR'd" seems to be broken on some Zhaoxin/VIA processors. Specifically:

Quoted 9 lines · Larry Wei

Thanks for your replying, the Probe URL of my laptop:
https://linux-hardware.org/?probe=58facb533d , and cpuinfo is:

larry@zx2:~/Downloads$ sudo cat /proc/cpuinfo
processor    : 0
vendor_id    : CentaurHauls
cpu family    : 7
model        : 59
model name    : ZHAOXIN KaiXian KX-6000G/[email protected]

[...]

Quoted 4 lines

flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl nonstop_tsc cpuid aperfmperf pni pclmulqdq monitor vmx smx est tm2 ssse3 cx16 xtpr

Quoted 8 lines

pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand rng rng_en ace ace_en ace2 phe phe_en pmm pmm_en lahf_lm abm 3dnowprefetch ibrs ibpb tpr_shadow ept vpid fsgsbase tsc_adjust bmi1 smep bmi2 invpcid rdseed adx smap sha_ni xsaveopt dtherm hwp hwp_act_window hwp_epp hwp_pkg_req vnmi umip pku ospke rdpid arch_capabilities
vmx flags    : vnmi invvpid ept_x_only ept_1gb tsc_offset vtpr mtf ept vpid unrestricted_guest ple

[...]

Notice that this has the PKU and OSPKE features set, but *not* XGETBV1. Which means that xfeatures_in_use() should not be called (and will cause a #GP exception).

(The full bug report log for this is at
<https://bugs.debian.org/1103397>.)

Is there some fallback that could be used in case XGETBV1 is not available? Or do we need a dependency X86_FEATURE_PKU -> X86_FEATURE_XGETBV1 in arch/x86/kernel/cpu/cpuid-deps.c, so that we disable protection keys in this CPU?

Quoted 2 lines

Ben.

Signature · 2 lines
Ben Hutchings
Who are all these weirdos? - David Bowie, on joining IRC

A message that is not in the archive (sent off-list or not yet received): 174486226753.86424.3234605951040281675.reportbug@zx2

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

Hi Larry Wei, hi Ben,

For context this is about https://bugs.debian.org/1103397, and which Ben did forward in
https://lore.kernel.org/regressions/[email protected]/T/

Quoted 9 lines · Larry Wei

Thank you all,

I have pulled the newest linux-next changes and compiled it, my laptop boots well now! https://linux-hardware.org/?probe=271fabb7a4 , but it still prints some WARNING information at startup:
https://linux-hardware.org/?probe=271fabb7a4&log=dmesg . May this output is useful for you maintainers.

And, thank you all again.

Going thorough the bugs I notice there was a related upstream discussion/patch relating to ae6012d72fa6 ("x86/pkeys: Ensure updated PKRU value is XRSTOR'd") in the following:

https://lore.kernel.org/all/[email protected]/

There were some followups, but discussion ended on 18.01.2025.

Did this felt through the cracks?

Regards,
Salvatore

#6 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

Salvatore Bonaccorso,

Yes, let's just consider it as good. But in fact, there are still many problems, such as the one mentioned above (https://linux-hardware.org/?probe=271fabb7a4&log=dmesg), and almost all laptops using Zhaoxin CPUs cannot adjust the backlight brightness, which is **VERY HARMFUL** to the eyes!

Regards,

larryw3i

Quoted 1 line · Salvatore Bonaccorso

Did this felt through the cracks?

#7 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

In reply to Salvatore Bonaccorso

Salvatore Bonaccorso,

Yes, let's just consider it as good. But in fact, there are still many problems, such as the one mentioned above ( linux-hardware.org/?probe=271fabb7a4&log=dmesg ), and almost all laptops using Zhaoxin CPUs cannot adjust the backlight brightness, which is **VERY HARMFUL** to the eyes!

Regards,

larryw3i

Quoted 1 line · Salvatore Bonaccorso

Did this felt through the cracks?

#8 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

Quoted 11 lines · Larry Wei

[这封邮件来自外部发件人 谨防风险]

Salvatore Bonaccorso,

Yes, let's just consider it as good. But in fact, there are still many problems, such as the one mentioned above ( linux-hardware.org/?probe=271fabb7a4&log=dmesg ), and almost all laptops using Zhaoxin CPUs cannot adjust the backlight brightness, which is **VERY HARMFUL** to the eyes!

Dear Larry,

We are currently investigating the causes of the WARNING messages you mentioned in this log:

[    4.141284] ------------[ cut here ]------------
[    4.141285] alg: self-tests for sha1 using sha1-padlock-nano failed (rc=-22)
[    4.141302] WARNING: CPU: 2 PID: 657 at crypto/testmgr.c:5865 alg_test.cold+0xb7/0xe0

Regarding the inability to adjust the laptop backlight brightness, we believe this issue is unlikely related to the CPU itself. It is recommended to contact the laptop manufacturer to confirm whether the device supports backlight brightness adjustment and inquire about specific configuration methods, such as installing specific EC controller drivers or updating graphics card drivers.

BRs!
TonyWWang-oc

Quoted 8 lines

Regards,

larryw3i

Quoted 1 line · Salvatore Bonaccorso

Did this felt through the cracks?

#9 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

Dear TonyWWang-oc,

Yes, but actually, these graphics cards are your products, and neither C-960 nor C-1080 seem to be open source.The drivers provided on your official website do not seem to be used for Debian.I downloaded your drivers and extracted them, and I found that each file has the license content.Can I assume that these drivers are open source?

Regards,

larryw3i

Quoted 1 line · Tony W Wang-oc

such as installing specific EC controller drivers or updating graphics card drivers.

#10 lore raw

Re: Bug#1103397: linux-image-amd64: Kernel Panic: copy_fpstate_to_sigframe crashes.

Quoted 4 lines · Larry Wei

[这封邮件来自外部发件人 谨防风险]

Quoted 8 lines

Dear TonyWWang-oc,

Yes, but actually, these graphics cards are your products, and neither C-960 nor C-1080 seem to be open source.The drivers provided on your official website do not seem to be used for Debian.I downloaded your drivers and extracted them, and I found that each file has the license content.Can I assume that these drivers are open source?

Dear Larry,

The graphics driver package contains both kernel-mode and user-mode components, where the kernel-mode components are open source, while graphics rendering tasks predominantly rely on user-mode implementations.

BRs!
TonyWWang-oc

Quoted 8 lines

Regards,

larryw3i

Quoted 2 lines · Tony W Wang-oc

such as installing specific EC controller drivers or updating graphics card drivers.