[UBUNTU 20.04] kernel: s390/cpum_cf,perf: changeDFLT_CCERROR counter name

Bug #1891454 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Undecided
Skipper Bug Screeners
linux (Ubuntu)
Fix Released
Medium
Skipper Bug Screeners
Bionic
Fix Released
Medium
Frank Heimes
Focal
Fix Released
Medium
Frank Heimes
Groovy
Fix Released
Medium
Skipper Bug Screeners

Bug Description

SRU Justification:
==================

[Impact]

* Change the counter name DLFT_CCERROR to DLFT_CCFINISH on IBM z15 to avoid confusion.

* This counter counts completed DEFLATE instructions with exit code 0, 1 or 2.

* And since exit code 0 means success and exit code 1 or 2 indicate errors the name can be ambiguous.

[Fix]

* Rename s390 z15 counter named DFLT_CCERROR to DFLT_CCFINISH.

* Backport Focal: https://launchpadlibrarian.net/493272507/0001-s390-cpum_cf-perf-change-DFLT_CCERROR-counter-name.patch

* Backport Bionic: https://launchpadlibrarian.net/493439681/u18-0001-s390-cpum_cf-Add-new-extended-counters-for-IBM-z15.patch

[Test Case]

* Enable hardware counters in the activation profile of a z15 LPAR.

* Just check the countername in sysfs with: ls /sys/devices/cpum_cf/events/{DFLT_CCERROR,DFLT_CCFINISH}

[Regression Potential]

* The regression potential can be considered as low, since:

* Counters like these are usually not activated by default and need to be explicitly enabled.

* No code functionality is changed with that patch, only a renaming is done at 3 places in one code file arch/s390/kernel/perf_cpum_cf_events.c as well as in /tools/perf/pmu-events/arch/s390/cf_z15/extended.json.

* The fix got already upstream accepted in 5.8-rc7, hence it got upstream reviewed,

* and the modifications are limited to s390x, are only relevant for the z15 / LinuxONE III hw generation that are relatively new.

* Issue with the renaming I can think of are that people don't know about the new name and may look for the old one and don't find it anymore,

* and with that also if the old counter name is used in scripts or applications, these may fails due to an unknown counter name.

[Other Info]

* The backports are based on commit 3d3af181d370069861a3be94608464e2ff3682e2 ("s390/cpum_cf,perf: change DFLT_CCERROR counter name") that is upstream accepted since v5.8-rc7.

* Hence this SRU is not requested for groovy, since it's already in groovys kernel 5.8 in proposed, but only requested for focal and bionic.
__________

Description: kernel: s390/cpum_cf,perf: change DFLT_CCERROR counter name
Symptom: Counter name CCERROR is misleading.
Problem: Change the counter name DLFT_CCERROR to DLFT_CCFINISH on
               IBM z15. This counter counts completed DEFLATE instructions
               with exit code 0, 1 or 2. Since exit code 0 means success
               and exit code 1 or 2 indicate errors, change the counter
               name to avoid confusion. This counter is incremented each
               time the DEFLATE instruction completed regardless if an
               error was detected or not.
Solution: Rename s390 z15 counter named DFLT_CCERROR to DFLT_CCFINISH
Reproduction: Command # ls /sys/devices/cpum_cf/events/DFLT_CCERROR
               currently succeeds. After this patch has been applied the
               command does not work anymore. The file does not exist
               anymore. Use command
               # ls /sys/devices/cpum_cf/events/DFLT_CCFINISH
               instead.
Upstream-ID: 5ce1a24dd98c00a57a8fa13660648abf7e08e3ef
Component: kernel 5.8

Will be integrated into 20.10 by kernel 5.8 integration.

Backport available for 20.04.
To be checked for 18.04 and 16.04, update will be provided

Here is the backported patch.
The upstream commit id is 3d3af181d370069861a3be94608464e2ff3682e2
("s390/cpum_cf,perf: change DFLT_CCERROR counter name")

Revision history for this message
bugproxy (bugproxy) wrote : s390/cpum_cf,perf: change DFLT_CCERROR counter name

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-187544 severity-high targetmilestone-inin2004
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-08-14 04:19 EDT-------
This fix need to be applied to groovy, which is already documented within LP. But focal and xenial, need also to be added.
The backports are available for both distros.
Please update your LP entry. Many thanks in advance.
I have seen the next SRU is due 2020-08-26 !

Revision history for this message
Frank Heimes (fheimes) wrote : Re: [UBUNTU 20.04] kernel: s390/cpum_cf,perf: change DFLT_CCERROR counter name

So if it should be applied down to xenial, it needs to be applied to bionic, too.

Changed in linux (Ubuntu Groovy):
status: New → Fix Committed
Changed in ubuntu-z-systems:
status: New → Triaged
Revision history for this message
bugproxy (bugproxy) wrote : Patch for Ubuntu 18.04 branch master-next

------- Comment (attachment only) From <email address hidden> 2020-08-14 03:41 EDT-------

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-08-14 07:26 EDT-------
Sorry for my mistake. Its not requested for xenial, -> bionic is correct...

Frank Heimes (fheimes)
no longer affects: linux (Ubuntu Xenial)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Frank Heimes (fheimes)
Changed in linux (Ubuntu Focal):
assignee: nobody → Frank Heimes (fheimes)
Revision history for this message
Frank Heimes (fheimes) wrote : Re: [UBUNTU 20.04] kernel: s390/cpum_cf,perf: change DFLT_CCERROR counter name

Kernel SRU request submitted:
https://lists.ubuntu.com/archives/kernel-team/2020-August/thread.html#112945
Changing status for Focal and Bionic to 'In Progress'.

Changed in linux (Ubuntu Bionic):
status: New → In Progress
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in ubuntu-z-systems:
status: Triaged → In Progress
description: updated
Revision history for this message
Frank Heimes (fheimes) wrote :

On top I've created builds of the patched kernel packages (for focal and bionic), available for further testing:
https://people.canonical.com/~fheimes/lp1891454_debs/

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-08-26 05:19 EDT-------
Verified ok for focal:

root@t35lp46:~# uname -a
Linux t35lp46 5.4.0-44-generic #48 SMP Tue Aug 25 12:53:01 UTC 2020 s390x s390x s390x GNU/Linux
root@t35lp46:~# ll /sys/devices/cpum_cf/events/| fgrep DFLT
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_ACCESS
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CC
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CCFINISH
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CYCLES
root@t35lp46:~#

Assumption: Same will be true for bionic....

Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Frank Heimes (fheimes) wrote : Re: [UBUNTU 20.04] kernel: s390/cpum_cf,perf: change DFLT_CCERROR counter name

I just submitted a v2 SRU request for bionic only:
https://lists.ubuntu.com/archives/kernel-team/2020-August/thread.html#113072

Frank Heimes (fheimes)
summary: - [UBUNTU 20.04] kernel: s390/cpum_cf,perf: change DFLT_CCERROR counter
- name
+ [UBUNTU 20.04] s390/cpum_cf,perf: change/add DFLT_CCERROR counter name
summary: - [UBUNTU 20.04] s390/cpum_cf,perf: change/add DFLT_CCERROR counter name
+ [UBUNTU 20.04] kernel: s390/cpum_cf,perf: changeDFLT_CCERROR counter
+ name
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the 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' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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: verification-needed-focal
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-09-01 02:28 EDT-------
As already explained in comment 22 above, this bz is already verified:
erified ok for focal:

root@t35lp46:~# uname -a
Linux t35lp46 5.4.0-44-generic #48 SMP Tue Aug 25 12:53:01 UTC 2020 s390x s390x s390x GNU/Linux
root@t35lp46:~# ll /sys/devices/cpum_cf/events/| fgrep DFLT
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_ACCESS
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CC
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CCFINISH
-r--r--r-- 1 root root 4096 Aug 26 09:15 DFLT_CYCLES
root@t35lp46:~#

Assumption: Same will be true for bionic....

[reply] [?]
Comment 23

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx for the focal verification - updating tags ...

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Frank Heimes (fheimes) wrote :

Fyi, the bionic SRU is not included in this SRU cycle, but probably in the next one.

Stefan Bader (smb)
Changed in linux (Ubuntu Bionic):
importance: Undecided → Medium
Changed in linux (Ubuntu Focal):
importance: Undecided → Medium
Changed in linux (Ubuntu Groovy):
importance: Undecided → Medium
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (42.6 KiB)

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

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

  * focal/linux: 5.4.0-48.52 -proposed tracker (LP: #1894654)

  * mm/slub kernel oops on focal kernel 5.4.0-45 (LP: #1895109)
    - SAUCE: Revert "mm/slub: fix a memory leak in sysfs_slab_add()"

  * Packaging resync (LP: #1786013)
    - update dkms package versions
    - update dkms package versions

  * Introduce the new NVIDIA 450-server and the 450 UDA series (LP: #1887674)
    - [packaging] add signed modules for nvidia 450 and 450-server

  * [UBUNTU 20.04] zPCI attach/detach issues with PF/VF linking support
    (LP: #1892849)
    - s390/pci: fix zpci_bus_link_virtfn()
    - s390/pci: re-introduce zpci_remove_device()
    - s390/pci: fix PF/VF linking on hot plug

  * [UBUNTU 20.04] kernel: s390/cpum_cf,perf: changeDFLT_CCERROR counter name
    (LP: #1891454)
    - s390/cpum_cf, perf: change DFLT_CCERROR counter name

  * [UBUNTU 20.04] zPCI: Enabling of a reserved PCI function regression
    introduced by multi-function support (LP: #1891437)
    - s390/pci: fix enabling a reserved PCI function

  * CVE-2020-12888
    - vfio/type1: Support faulting PFNMAP vmas
    - vfio-pci: Fault mmaps to enable vma tracking
    - vfio-pci: Invalidate mmaps and block MMIO access on disabled memory

  * [Hyper-V] VSS and File Copy daemons intermittently fails to start
    (LP: #1891224)
    - [Packaging] Bind hv_vss_daemon startup to hv_vss device
    - [Packaging] bind hv_fcopy_daemon startup to hv_fcopy device

  * alsa/hdmi: support nvidia mst hdmi/dp audio (LP: #1867704)
    - ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense
    - ALSA: hda - Add DP-MST jack support
    - ALSA: hda - Add DP-MST support for non-acomp codecs
    - ALSA: hda - Add DP-MST support for NVIDIA codecs
    - ALSA: hda: hdmi - fix regression in connect list handling
    - ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx
    - ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms
    - ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms
    - ALSA: hda - Fix DP-MST support for NVIDIA codecs

  * Focal update: v5.4.60 upstream stable release (LP: #1892899)
    - smb3: warn on confusing error scenario with sec=krb5
    - genirq/affinity: Make affinity setting if activated opt-in
    - genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq()
    - PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
    - PCI: Add device even if driver attach failed
    - PCI: qcom: Define some PARF params needed for ipq8064 SoC
    - PCI: qcom: Add support for tx term offset for rev 2.1.0
    - btrfs: allow use of global block reserve for balance item deletion
    - btrfs: free anon block device right after subvolume deletion
    - btrfs: don't allocate anonymous block device for user invisible roots
    - btrfs: ref-verify: fix memory leak in add_block_entry
    - btrfs: stop incremening log_batch for the log root tree when syncing log
    - btrfs: remove no longer needed use of log_writers for the log root tree
    - btrfs: don't traverse into the seed devices in show_devname
    - btrfs: open device...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Frank Heimes (fheimes)
Changed in linux (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the 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-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

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: verification-needed-bionic
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-09-22 08:14 EDT-------
I just installed bionic (Ubuntu 18.04) and installed the latest kernel from the
bionic-proposed repository. I can confirm that this bug is fixed.
The counter name DFLT_CCFINISH is available:

oot@t35lp46:~# uname -a
Linux t35lp46 4.15.0-119-generic #120-Ubuntu SMP Fri Sep 18 11:07:39 UTC 2020 s390x s390x s390x GNU/Linux
root@t35lp46:~# ls -l /sys/devices/cpum_cf/events/DFLT*
-r--r--r-- 1 root root 4096 Sep 22 14:10 /sys/devices/cpum_cf/events/DFLT_ACCESS
-r--r--r-- 1 root root 4096 Sep 22 14:10 /sys/devices/cpum_cf/events/DFLT_CC
-r--r--r-- 1 root root 4096 Sep 22 14:10 /sys/devices/cpum_cf/events/DFLT_CCFINISH
-r--r--r-- 1 root root 4096 Sep 22 14:10 /sys/devices/cpum_cf/events/DFLT_CYCLES
root@t35lp46:~# lsb_release -cs
bionic
root@t35lp46:~#

Verified ok.

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx Thomas for the verification on bionic - adjusting tags ...

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (25.4 KiB)

This bug was fixed in the package linux - 4.15.0-121.123

---------------
linux (4.15.0-121.123) bionic; urgency=medium

  * Packaging resync (LP: #1786013)
    - update dkms package versions

linux (4.15.0-120.122) bionic; urgency=medium

  * CVE-2020-16119
    - SAUCE: dccp: avoid double free of ccid on child socket

  * CVE-2020-16120
    - Revert "UBUNTU: SAUCE: overlayfs: ensure mounter privileges when reading
      directories"
    - ovl: pass correct flags for opening real directory
    - ovl: switch to mounter creds in readdir
    - ovl: verify permissions in ovl_path_open()

linux (4.15.0-119.120) bionic; urgency=medium

  * bionic/linux: 4.15.0-119.120 -proposed tracker (LP: #1896040)

  * gtp: unable to associate contextes to interfaces (LP: #1894605)
    - gtp: add GTPA_LINK info to msg sent to userspace

  * uvcvideo: add mapping for HEVC payloads (LP: #1895803)
    - media: videodev2.h: Add v4l2 definition for HEVC
    - SAUCE: media: uvcvideo: Add mapping for HEVC payloads

  * Novalink (mkvterm command failure) (LP: #1892546)
    - tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup()

  * rtnetlink.sh in net from ubuntu_kernel_selftests is returning 1 for a
    skipped test (LP: #1895258)
    - selftests: net: return Kselftest Skip code for skipped tests

  * Bionic update: upstream stable patchset 2020-09-16 (LP: #1895873)
    - net: Fix potential wrong skb->protocol in skb_vlan_untag()
    - tipc: fix uninit skb->data in tipc_nl_compat_dumpit()
    - ipvlan: fix device features
    - gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
    - ALSA: pci: delete repeated words in comments
    - ASoC: tegra: Fix reference count leaks.
    - mfd: intel-lpss: Add Intel Emmitsburg PCH PCI IDs
    - arm64: dts: qcom: msm8916: Pull down PDM GPIOs during sleep
    - powerpc/xive: Ignore kmemleak false positives
    - media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA
      value in debiirq()
    - blktrace: ensure our debugfs dir exists
    - scsi: target: tcmu: Fix crash on ARM during cmd completion
    - iommu/iova: Don't BUG on invalid PFNs
    - drm/amdkfd: Fix reference count leaks.
    - drm/radeon: fix multiple reference count leak
    - drm/amdgpu: fix ref count leak in amdgpu_driver_open_kms
    - drm/amd/display: fix ref count leak in amdgpu_drm_ioctl
    - drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config
    - drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails
    - scsi: lpfc: Fix shost refcount mismatch when deleting vport
    - selftests/powerpc: Purge extra count_pmc() calls of ebb selftests
    - omapfb: fix multiple reference count leaks due to pm_runtime_get_sync
    - PCI: Fix pci_create_slot() reference count leak
    - rtlwifi: rtl8192cu: Prevent leaking urb
    - mips/vdso: Fix resource leaks in genvdso.c
    - cec-api: prevent leaking memory through hole in structure
    - f2fs: fix use-after-free issue
    - drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open
    - drm/nouveau: Fix reference count leak in nouveau_connector_detect
    - locking/lockdep: Fix overflow in presentation of average lock-time
    - scsi: iscsi: Do not put h...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-10-20 08:52 EDT-------
IBM Bugzilla status->closed, Fix Released with all requested distros

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.