[Ubuntu 21.04] s390/vtime: fix increased steal time accounting

Bug #1921498 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
linux (Ubuntu)
Fix Released
High
Canonical Kernel Team
Focal
Fix Released
High
Canonical Kernel Team
Groovy
Fix Released
High
Canonical Kernel Team
Hirsute
Fix Released
High
Canonical Kernel Team

Bug Description

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

[Impact]

* The reported steal time on s390x is erroneously increasing and therefore broken.

* This problem got introduced with commit 152e9b8676c6e
  ("s390/vtime: steal time exponential moving average") - upstream with v5.1

[Fix]

* d54cb7d54877d529bc1e0e1f47a3dd082f73add3 d54cb7d54877 "s390/vtime: fix increased steal time accounting"

[Test Case]

* An IBM Z or LinuxONE systems, installed with Ubuntu Server 20.04, 20.10 and 21.04 on LPAR, are needed.

* The system needs to be configured as KVM host with one or more KVM guests.

* Now put significant workload on the guest(s), so that the hypervisor starts to 'steal time'.
  This can be best forced by having only very limited CPU resources for the hypervisor itself.

* Start monitoring the steal time, that is reported at /proc/stat,
  but can be more easily verified with tools like vmstat or even top.

* If the steal time starts ever growing (exponentially), the situation is broken.

* In case the steal time stays relatively constant,
  or grows only very limited after a ramp up phase of some minutes,
  or just oscillates around a certain value, a fixed/patched kernel is in use.

[Regression Potential]

* The patch only changes the single line that calculates: account_steal_time

* In case the account_steal_time calculation is still broken after the modification,
  the steal time is just again not reported correctly on s390x,
  but maybe in a different way (rather than exponentially growing).

* But it will not further harm virtualization on s390x systems.

* The modification is very limited with that one line change.

* The commit got upstream accepted with 5.12-rc4.

[Other]

* Since the patch is needed for kernel higher than 5.1 and got upstream accepted with 5.12-rc4,
  hirsute, groovy and focal are affected.

* The upstream commit can be cleanly cherry-picked from all three affected Ubuntu releases.
__________

Description: s390/vtime: fix increased steal time accounting
Symptom: Increased steal time values.
Problem: Commit 152e9b8676c6e ("s390/vtime: steal time exponential
               moving average") inadvertently changed the input value for
               account_steal_time() from "cputime_to_nsecs(steal)" to just
               "steal", resulting in broken increased steal time accounting.
Solution: Fix this by changing it back to "cputime_to_nsecs(steal)".
Reproduction: -
Upstream-ID: d54cb7d54877d529bc1e0e1f47a3dd082f73add3

Stable tagged : kernel 5.1.

Therefore only to be applyable for focal, groovy, hirsuite.

Due to stable tag integration , only for integration checking..

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-192225 severity-high targetmilestone-inin2104
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
importance: Undecided → High
status: New → Triaged
Changed in linux (Ubuntu Hirsute):
assignee: Skipper Bug Screeners (skipper-screen-team) → Frank Heimes (fheimes)
Revision history for this message
Frank Heimes (fheimes) wrote :
Revision history for this message
Frank Heimes (fheimes) wrote :

Kernel SRU request submitted for groovy and focal - and PATCH for hirsute:
https://lists.ubuntu.com/archives/kernel-team/2021-March/thread.html#118639
changing status to 'In Progress' for all entries (F, G and H).

description: updated
Changed in linux (Ubuntu Focal):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Groovy):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Hirsute):
assignee: Frank Heimes (fheimes) → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Focal):
importance: Undecided → High
Changed in linux (Ubuntu Groovy):
importance: Undecided → High
Changed in linux (Ubuntu Hirsute):
importance: Undecided → High
status: New → In Progress
Changed in linux (Ubuntu Groovy):
status: New → In Progress
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Groovy):
status: In Progress → Fix Committed
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → Fix Committed
Revision history for this message
Frank Heimes (fheimes) wrote :

The commit "s390/vtime: fix increased steal time accounting" landed in hirsute as c64e48d4ace3 in kernel Ubuntu-5.11.0-14 and this kernel is in hirsute's release pocket:
 linux-generic | 5.11.0.14.15 | hirsute | s390x
Hence closing the hirsute entry as Fix Released.

Changed in linux (Ubuntu Hirsute):
status: In Progress → 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-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
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-groovy' to 'verification-done-groovy'. If the problem still exists, change the tag 'verification-needed-groovy' to 'verification-failed-groovy'.

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-groovy
Frank Heimes (fheimes)
summary: - [UBUNUT 21.04] s390/vtime: fix increased steal time accounting
+ [Ubuntu 21.04] s390/vtime: fix increased steal time accounting
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-04-28 09:21 EDT-------
Verified by IBM for focal and groovy...

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

Thx for the verifications, I've adjusted the tags accordingly.

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

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

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

  * focal/linux: 5.4.0-73.82 -proposed tracker (LP: #1923781)

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

  * CIFS DFS entries not accessible with 5.4.0-71.74-generic (LP: #1923670)
    - Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting
      cifs_sb->prepath."

  * CVE-2021-29650
    - Revert "netfilter: x_tables: Update remaining dereference to RCU"
    - Revert "netfilter: x_tables: Switch synchronization to RCU"
    - netfilter: x_tables: Use correct memory barriers.

  * LRMv4: switch to signing nvidia modules via the Ubuntu Modules signing key
    (LP: #1918134)
    - [Packaging] dkms-build{,--nvidia-N} sync back from LRMv4

  * 5.4 kernel: when iommu is on crashdump fails (LP: #1922738)
    - iommu/vt-d: Refactor find_domain() helper
    - iommu/vt-d: Add attach_deferred() helper
    - iommu/vt-d: Move deferred device attachment into helper function
    - iommu/vt-d: Do deferred attachment in iommu_need_mapping()
    - iommu/vt-d: Remove deferred_attach_domain()
    - iommu/vt-d: Simplify check in identity_mapping()

  * Backport mlx5e fix for tunnel offload (LP: #1921769)
    - net/mlx5e: Check tunnel offload is required before setting SWP

  * Bcache bypasse writeback on caching device with fragmentation (LP: #1900438)
    - bcache: consider the fragmentation when update the writeback rate

  * Fix implicit declaration warnings for kselftests/memfd test on newer
    releases (LP: #1910323)
    - selftests/memfd: Fix implicit declaration warnings

  * net/mlx5e: Add missing capability check for uplink follow (LP: #1921104)
    - net/mlx5e: Add missing capability check for uplink follow

  * [UBUNUT 21.04] s390/vtime: fix increased steal time accounting
    (LP: #1921498)
    - s390/vtime: fix increased steal time accounting

  * Mute/Mic-mute LEDs are not work on HP 850/840/440 G8 Laptops (LP: #1920030)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP 840 G8
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP 440 G8
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP 850 G8

  * Focal update: v5.4.106 upstream stable release (LP: #1920246)
    - uapi: nfnetlink_cthelper.h: fix userspace compilation error
    - powerpc/pseries: Don't enforce MSI affinity with kdump
    - ath9k: fix transmitting to stations in dynamic SMPS mode
    - net: Fix gro aggregation for udp encaps with zero csum
    - net: check if protocol extracted by virtio_net_hdr_set_proto is correct
    - net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0
    - sh_eth: fix TRSCER mask for SH771x
    - can: skb: can_skb_set_owner(): fix ref counting if socket was closed before
      setting skb ownership
    - can: flexcan: assert FRZ bit in flexcan_chip_freeze()
    - can: flexcan: enable RX FIFO after FRZ/HALT valid
    - can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode
    - can: tcan4x5x: tcan4x5x_init(): fix initialization - clear MRAM before
      entering Normal Mode
    - tcp: add sanity tests to TCP_QUEUE_SEQ
    - netfilter: nf_nat: undo erroneous tcp edemux lookup
    - ne...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.8.0-53.60

---------------
linux (5.8.0-53.60) groovy; urgency=medium

  * CVE-2021-3491
    - io_uring: fix provide_buffers sign extension
    - io_uring: fix overflows checks in provide buffers
    - SAUCE: proc: Avoid mixing integer types in mem_rw()
    - SAUCE: io_uring: truncate lengths larger than MAX_RW_COUNT on provide
      buffers

  * CVE-2021-3490
    - bpf: Fix a verifier failure with xor
    - SAUCE: bpf: verifier: fix ALU32 bounds tracking with bitwise ops

  * CVE-2021-3489
    - SAUCE: bpf: ringbuf: deny reserve of buffers larger than ringbuf
    - SAUCE: bpf: prevent writable memory-mapping of read-only ringbuf pages

 -- Stefan Bader <email address hidden> Thu, 06 May 2021 07:43:20 +0200

Changed in linux (Ubuntu Groovy):
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> 2021-05-18 06:27 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.