[UBUNTU 22.04] s390/cpum_cf: make crypto counters upward compatible
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Committed
|
High
|
Skipper Bug Screeners | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
High
|
Canonical Kernel Team | ||
Noble |
Fix Committed
|
High
|
Canonical Kernel Team |
Bug Description
SRU Justification:
[ Impact ]
* The CPU Measurement Facility (CPU MF) crypto counter set
is not listed in the device sysfs tree - it's not exported
in the sysfs directory /sys/devices/
* The attribute files for each CPU-MF counter defined
in the crypto counter set is missing.
* This is caused by the counter second version number of CPU MF
hardware being incremented on new machines.
* This causes a sanity check to fail,
but the counters are supported by hardware.
* The solution is to remove the upper limit in counter second
version number check.
[ Fix ]
* f10933cbd2df f10933cbd2dfddf
"s390/cpum_cf: make crypto counters upward compatible across machine types"
* The fix was upstream accepted with kernel v6.10(-rc1).
* Upstream commit applies cleanly on noble master-next,
but needed to be backported to jammy master-next due to different code
and context in kernel 5.15.
[ Test Plan ]
* Run the following commands on a new machine generation:
(hence only doable by IBM)
# ls -l /sys/devices/
* If the output is empty than this patch is required.
* With a patched kernel the output should be like:
# ls /sys/devices/
AES_
AES_
AES_CYCLES
AES_FUNCTIONS
[ Where problems could occur ]
* This affects s390x only - CPU MF is s390-specific,
and only s390 specific code is modified.
* And it furthermore is limited to the crypto counter set
of CPU MF.
* So any impact is likely limited to hardware crypto counters
on s390x only.
* In s390/kernel/
explicitly checking for 6 or 7 to >= 6 which seems to require
attention for future 8 and more cases.
* In s390/kernel/
was changed to an if / else if with similar logic.
Again attentioin for any potential future cases >= 8.
* It does not look like currently used cases (1..5 and 6..7)
are affected by the modification, just >7.
* Test build of patched jammy and noble s390x kernels were build
and are avaiable here:
https:/
[ Other Info ]
* Since the code/fix was upstream accepted with kernel v6.10(-rc1)
it does not affect the current development release oracular.
* This SRU can also be seen under the umbrella of new
hardware enablement.
* Since it requires special hw, the verification needs to be
done by IBM.
__________
Description: kernel: s390/cpum_cf: make crypto counters upward compatible
Symptom: The CPU Measurement facility crypto counter set is not
Problem: The CPU Measurement facility crypto counter set is not
The attribute files for each CPU-MF counter defined
in the crypto counter set is missing. This is caused
by the counter second version number of the CPU
new machines. This causes a sanity check to fail,
but the counters are supported by hardware.
Solution: Remove upper limit in counter second version number
Reproduction: Run command on a new machine generation:
# ls -l /sys/devices/
#
If the output is empty than this patch is required.
The output should be:
# ls /sys/devices/
#
Upstream-ID of fix: f10933cbd2dfddf
tags: | added: architecture-s39064 bugnameltc-207993 severity-high targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | New → Fix Released |
Changed in ubuntu-z-systems: | |
importance: | Undecided → High |
Changed in linux (Ubuntu Jammy): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Noble): | |
importance: | Undecided → High |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
Changed in linux (Ubuntu): | |
assignee: | Skipper Bug Screeners (skipper-screen-team) → nobody |
Changed in linux (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in linux (Ubuntu Noble): | |
status: | New → In Progress |
Changed in ubuntu-z-systems: | |
status: | New → In Progress |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
assignee: | nobody → Frank Heimes (fheimes) |
Changed in linux (Ubuntu Noble): | |
assignee: | nobody → Frank Heimes (fheimes) |
description: | updated |
summary: |
- [UBUNTU 22.04] kernel: s390/cpum_cf: make crypto counters upward - compatible + [UBUNTU 22.04] s390/cpum_cf: make crypto counters upward compatible |
Changed in linux (Ubuntu Noble): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Jammy): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
The commit applies fine to the noble master-next tree (kernel 6.8), /launchpad. net/~fheimes/ +archive/ ubuntu/ lp2074380
and a test build was triggered here: https:/
However, the cpumf code in jammy master-next (kernel 5.15) is quite different. ctr_version( )
git blame tells me that probably the following commits are needed as well:
111783-1a33aee1dc24 s390/cpum_cf: remove function validate_ctr_auth() by inline code
111784-9ae9b868aeaa s390/cpum_cf: provide counter number to validate_
111785:46c4d945ea1f s390/cpum_cf: introduce static CPU counter facility information
but they (first of all 46c4d945ea1f) also do not apply cleanly.
Would you please let us know a minimal set of patches (based on your insights of the code) that let us apply f10933cbd2df to the jammy master-next tree (git clone git://git. launchpad. net/~ubuntu- kernel/ ubuntu/ +source/ linux/+ git/jammy --branch master-next --single-branch)
or alternatively a backport of f10933cbd2df to this tree?