[UBUNTU 20.04] KVM hardware diagnose data improvements for guest kernel - kernel part
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Skipper Bug Screeners | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Canonical Kernel Team | ||
Focal |
Fix Released
|
Undecided
|
Canonical Kernel Team | ||
Hirsute |
Invalid
|
Undecided
|
Canonical Kernel Team | ||
Impish |
Fix Released
|
Undecided
|
Canonical Kernel Team | ||
Jammy |
Fix Released
|
Undecided
|
Canonical Kernel Team |
Bug Description
SRU Justification:
==================
[Impact]
* Hardware diagnose data (diag 318) of KVM guest kernel cannot be handled.
* A fix is needed to enhance problem determination of guest kernel under KVM using DIAG 0x318 instruction execution.
* The s390x diagnose 318 instruction sets the control program name code (CPNC) and control program version code (CPVC) to provide useful information regarding the OS during debugging.
* The CPNC is explicitly set to 4 to indicate a Linux/KVM environment.
[Fix]
* In general the following 4 commits are needed:
* 3fd8417f2c728d8
https:/
* 6cbf1e960fa52e4
https:/
* 23a60f834406c8e
https:/
* a23816f3cdcbffe
https:/
* For jammy, hirsute and impish only the first commit is needed, the others are already in.
* For focal all 4 commits are needed, but since they do not apply cleanly on focal, the attached backports need to be used instead.
[Test Case]
* Setup an IBM Z or LinuxONE LPAR with Ubuntu Server as KVM host.
* And setup an Ubuntu KVM virtual machine on top.
* It can then be observed if the CPNC (diag318 data) has been successfully set by looking at the s390dbf messages for the KVM guest.
* The CPNC will always be 4 (denotes Linux environment).
* Another way to test this is by running the sync_regs_test under tools/testing/
[Where problems could occur]
* The approach here is to provide additional debug and diagnose information on top.
* Hence even if the diag318 changes are broken, the existing functionality shouldn't be harmed.
* The changes themselves are relatively discernible and mostly introduce new structures.
* However, with the functional changes broken code could be introduced (e.g. due to erroneous pointer arithmetic for example) that does not compile or causes crashes. But this is what the test builds are for (https:/
* On top the diag318 diagnose data might not properly provided - maybe empty or wrong. Again that is what the test builds and the verification later is targeted at.
* Since diag318 is s390x specific, all the modifications touch s390x code only. (in arch/s390/kvm/ kvm-s390.c and vsie.c, arch/s390/
* Well, there is one tiny bit of a common code change, but it's just a new define statement in include/
[Other]
* Request was to add the patches to focal / 20.04, but to avoid potential regressions on upgrades, the patches need to be added to jammy, impish and hirsute, too.
* As mentioned above, Jammy, Hirsute and Impish includes almost everything needed, except 3fd8417f2c72 "KVM: s390: add debug statement for diag 318 CPNC data".
* Hence the SRU is for Focal, Jammy, Hirsute and Impish, but less invasive for Jammy, Hirsute and Impish, also because commit 3fd8417f2c72 can be cleanly cherry-picked form there.
* LP#1953338 is related to this bug and covers the qemu/KVM bits.
__________
Hardware diagnose data (diag 318) of KVM guest kernel cannot be handled.
Fix needed to enhance problem determination of guest kernel under KVM
CVE References
tags: | added: architecture-s39064 bugnameltc-195465 severity-high targetmilestone-inin2004 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
importance: | Undecided → High |
description: | updated |
summary: |
[UBUNTU 20.04] KVM hardware diagnose data improvements for guest kernel - - kernel part + (diag 318) |
summary: |
[UBUNTU 20.04] KVM hardware diagnose data improvements for guest kernel - (diag 318) + - kernel part |
Changed in linux (Ubuntu Impish): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Hirsute): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
------- Comment on attachment From <email address hidden> 2021-12-06 10:42 EDT-------
Re-attaching Collin's Patch as 'external' for sharing with Canonical