** 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 changed:

+ 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/cpum_cf/events.
+ 
+  * 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 f10933cbd2dfddf6273698a45f76db9bafd8150f "s390/cpum_cf:
+ make crypto counters upward compatible across machine types"
+ 
+  * The fix was upstream accepted with kernel v6.10(-rc1).
+ 
+ [ Test Plan ]
+ 
+  * Run the following commands on a new machine generation:
+    (hence only doable by IBM)
+    # ls -l /sys/devices/cpum_cf/events/ | grep AES
+    
+  * If the output is empty than this patch is required.
+ 
+  * With a patched kernel the output should be like:
+    # ls /sys/devices/cpum_cf/events/ | grep AES
+    AES_BLOCKED_CYCLES
+    AES_BLOCKED_FUNCTIONS
+    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/perf_cpum_cf.c the else if case got changed from
+    explicitly checking for 6 or 7 to >= 6 which seems to require
+    attention for future 8 and more cases.
+ 
+  * In s390/kernel/perf_cpum_cf_events.c the switch (ci.csvn) statement
+    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://launchpad.net/~fheimes/+archive/ubuntu/lp2074380
+ 
+ [ 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
-                listed in the device sysfs tree.  
+                listed in the device sysfs tree.
  
  Problem:       The CPU Measurement facility crypto counter set is not
-                exported in the sysfs directory
-                /sys/devices/cpum_cf/events.
-                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
-                Measurement Facility hardware being incremented on
-                new machines.  This causes a sanity check to fail,
-                but the counters are supported by hardware.
+                exported in the sysfs directory
+                /sys/devices/cpum_cf/events.
+                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
+                Measurement Facility hardware being incremented on
+                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
-                check.
+                check.
  
  Reproduction:  Run command on a new machine generation:
-                 # ls -l /sys/devices/cpum_cf/events/ | grep AES
-                 # 
-                If the output is empty than this patch is required.
-                The output should be:
-                 # ls  /sys/devices/cpum_cf/events/ | grep AES
-                 AES_BLOCKED_CYCLES
-                 AES_BLOCKED_FUNCTIONS
-                 AES_CYCLES
-                 AES_FUNCTIONS
-                 #
+                 # ls -l /sys/devices/cpum_cf/events/ | grep AES
+                 #
+                If the output is empty than this patch is required.
+                The output should be:
+                 # ls  /sys/devices/cpum_cf/events/ | grep AES
+                 AES_BLOCKED_CYCLES
+                 AES_BLOCKED_FUNCTIONS
+                 AES_CYCLES
+                 AES_FUNCTIONS
+                 #
  
  Upstream-ID of fix:   f10933cbd2dfddf6273698a45f76db9bafd8150f

** Changed in: linux (Ubuntu Jammy)
     Assignee: (unassigned) => Frank Heimes (fheimes)

** Changed in: linux (Ubuntu Noble)
     Assignee: (unassigned) => Frank Heimes (fheimes)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2074380

Title:
  [UBUNTU 22.04] kernel: s390/cpum_cf: make crypto counters upward
  compatible

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/2074380/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to