Fix boot test warning for log_check "CPU: 0 PID: 0 at arch/x86/kernel/fpu/xstate.c:878 get_xsave_addr+0x98/0xb0"

Bug #2031022 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned
Focal
Fix Released
Undecided
Roxana Nicolescu

Bug Description

SRU Justification

[Impact]

Gather Data Sampling, affecting Intel processors and assigned CVE-2022-40982 introduced this warning.The fix is on microcode, but part of the mitigation on the kernel side is to detect if the microcode update is not there and disable AVX in case it's supported. This needed some reshuffle during initialization so that turning off AVX was possible without it being too late, which also moved the FPU initialization. See commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.4.252&id=6e60443668978131a442df485db3deccb31d5651

This causes the following warning during boot: CPU: 0 PID: 0 at arch/x86/kernel/fpu/xstate.c:878 get_xsave_addr+0x98/0xb0

Logs:
      1546 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.438234] ------------[ cut here ]------------
      1547 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.439198] get of unsupported state
      1548 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.439206] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/fpu/xstate.c:878 get_xsave_addr+0x98/0xb0
      1549 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] Modules linked in:
      1550 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-158-lowlatency #175-Ubuntu
      1551 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] Hardware name: NVIDIA NVIDIA DGX-2/NVIDIA DGX-2, BIOS 0.29 06/07/2021
      1552 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] RIP: 0010:get_xsave_addr+0x98/0xb0
      1553 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] Code: 7e ff ff ff 48 83 c4 08 5b 5d c3 80 3d ed d8 bc 01 00 75 ae 48 c7 c7 52 76 51 9a 89 75 f4 c6 05 da d8 bc 01 01 e8 1a c8 a7 00 <0f> 0b 8b 75 f4 eb 91 31 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f
      1554 09:02:40 INFO | Aug 10 09:01:05 akis systemd-udevd[3200]: enp58s0np0: Process '/usr/bin/killall -SIGHUP irqbalance' failed with exit code 1.
      1555 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] RSP: 0000:ffffffff9ac03e80 EFLAGS: 00010282
      1556 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] RAX: 0000000000000000 RBX: ffffffff9ae47180 RCX: 000000032109e11a
      1557 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] RDX: 0000000000000018 RSI: ffffffff9bd8c620 RDI: 0000000000000246
      1558 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] RBP: ffffffff9ac03e90 R08: ffffffff9bd8c620 R09: 74726f707075736e
      1559 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] R10: 74726f707075736e R11: 6574617473206465 R12: ffffffff9ae47040
      1560 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] R13: 0000000000000246 R14: 000000005a1c7469 R15: 000000005a1d7ee0
      1561 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] FS: 0000000000000000(0000) GS:ffffa08400400000(0000) knlGS:0000000000000000
      1562 09:02:40 INFO | Aug 10 09:01:05 akis systemd[1]: Starting Load Kernel Module pstore_zone...
      1563 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      1564 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] CR2: ffffa146fffff000 CR3: 000000802c80a001 CR4: 00000000007200b0
      1565 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      1566 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      1567 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] Call Trace:
      1568 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? show_regs.cold+0x1a/0x1f
      1569 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? __warn+0x98/0xe0
      1570 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? get_xsave_addr+0x98/0xb0
      1571 09:02:40 INFO | Aug 10 09:01:05 akis systemd[1]: Condition check resulted in Load Kernel Module ramoops being skipped.
      1572 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? report_bug+0xd1/0x100
      1573 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? do_error_trap+0x9b/0xc0
      1574 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? do_invalid_op+0x3c/0x50
      1575 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? get_xsave_addr+0x98/0xb0
      1576 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? invalid_op+0x1e/0x30
      1577 09:02:40 INFO | Aug 10 09:01:05 akis systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
      1578 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ? get_xsave_addr+0x98/0xb0
      1579 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] identify_cpu+0x520/0x580
      1580 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] identify_boot_cpu+0x10/0x9a
      1581 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] arch_cpu_finalize_init+0x9/0x4d
      1582 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] start_kernel+0x4a9/0x557
      1583 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] x86_64_start_reservations+0x24/0x26
      1584 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] x86_64_start_kernel+0x8f/0x93
      1585 09:02:40 INFO | Aug 10 09:01:05 akis systemd[1]: Condition check resulted in Show Plymouth Boot Screen being skipped.
      1586 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] secondary_startup_64+0xa4/0xb0
      1587 09:02:40 INFO | Aug 10 09:01:05 akis kernel: [ 13.440197] ---[ end trace 6200f61a0ffeb796 ]---

[Fix]
This commit seems to fix the warning https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.14.321&id=b3607269ff57

[Test plan]
Booted locally and no warning shown.

[Regression potentials]
We may see issue during FPU init.

tags: added: sru-20230807
Changed in linux (Ubuntu Focal):
status: New → Fix Committed
assignee: nobody → Roxana Nicolescu (roxanan)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-162.179 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal-linux' to 'verification-done-focal-linux'. If the problem still exists, change the tag 'verification-needed-focal-linux' to 'verification-failed-focal-linux'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-v2 verification-needed-focal-linux
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

No warning during boot anymore.

tags: added: verification-done-focal
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 2031022

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.4.0-159.176

---------------
linux (5.4.0-159.176) focal; urgency=medium

  * focal/linux: 5.4.0-159.176 -proposed tracker (LP: #2031149)

  * libgnutls report "trap invalid opcode" when trying to install packages over
    https (LP: #2031093)
    - [Config]: disable CONFIG_GDS_FORCE_MITIGATION

  * Fix boot test warning for log_check "CPU: 0 PID: 0 at
    arch/x86/kernel/fpu/xstate.c:878 get_xsave_addr+0x98/0xb0" (LP: #2031022)
    - x86/pkeys: Revert a5eff7259790 ("x86/pkeys: Add PKRU value to init_fpstate")

 -- Thadeu Lima de Souza Cascardo <email address hidden> Mon, 14 Aug 2023 08:18:30 -0300

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
tags: added: verification-done-focal-linux
removed: verification-done-focal verification-needed-focal-linux
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.4.0-1117.124 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal-linux-azure' to 'verification-done-focal-linux-azure'. If the problem still exists, change the tag 'verification-needed-focal-linux-azure' to 'verification-failed-focal-linux-azure'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-azure-v2 verification-needed-focal-linux-azure
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

Nothing special for azure, and I assume the source package was not built against the previous version, hence the verification is triggered again.

tags: added: verification-done-focal-linux-azure
removed: verification-needed-focal-linux-azure
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.4.0-1071.77 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal-linux-bluefield' to 'verification-done-focal-linux-bluefield'. If the problem still exists, change the tag 'verification-needed-focal-linux-bluefield' to 'verification-failed-focal-linux-bluefield'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-bluefield-v2 verification-needed-focal-linux-bluefield
Revision history for this message
Bartlomiej Zolnierkiewicz (bzolnier) wrote :

Similar situation for bluefield kernel as with azure kernel. Moreover bluefield is arm64 only and this is x86 specific bug.

tags: added: verification-done-focal-linux-bluefield
removed: verification-needed-focal-linux-bluefield
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.