[UBUNTU 20.04] s390x/pci: s390_pci_mmio_write/read fail when MIO instructions are available
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
|
Unassigned |
Bug Description
SRU Justification:
==================
[Impact]
* Code that is using s390_pci_
* This issue happens if enablement for z15 PCI enhancements is in place and where customers run workloads which access PCI adapters from user space, like RoCE/RDMA.
* To solve this, the system call implementation needs to be improved to execute the enhanced PCI load/store instructions on behalf of the user space application,
making use of the mappings into its virtual address space.
[Fix]
* f058599e22d59e5
[Test Case]
* Setting up a z15 with at least one PCI card (like RoCE) using an operating system that includes support and enablement for z15 (line 20.04).
* Install the rdma tools: sudo apt install ibverbs-providers ibverbs-utils
* Verify you have some RDMA devices (requires ConnectX adapter)
$ ibv_devices
device node GUID
------ ----------------
mlx5_0 98039b0300c682b4
* Verify MIO instructions are enabled for the device
$ cat /sys/bus/
1
* Try to run an RDMA application from user space, e.g. ibv_rc_pingpong
server side:
ibv_rc_pingpong -d mlx5_0 -g 0 &
client side:
ibv_rc_pingpong -d mlx5_0 -g 0 localhost
* Verify whether the kernel crashes or not.
* Verification needs to be done by IBM on z15 hardware.
[Regression Potential]
* There is some regression potential with having code changes in the zPCI sub-system (zPCI is limited to s390x)
* It could be that zPCI hardware get harmed, but zPCI hardware is not as wide-spread on s390x than ccw hardware components.
* Only z15 hardware is affected - no other s390x hardware that is supported by Ubuntu.
* However, the zPCI system is s390x only and the patch was accepted upstream with v5.7-rc7 and Linus commented: "And none of the fixes look like there's anything particularly scary going on. Most of it is very small, and the slightly larger patches aren't huge either and are well-contained (the two slightly larger patches are to s390 and rxrpc - and even those patches aren't really all _that_ big)"
__________
One of the PCI enhancements on Z15 are the enhanced PCI load/store instructions which can be executed directly from user space code. When these instructions are available and preexisting user space code still uses the old s390_pci_
CVE References
tags: | added: architecture-s39064 bugnameltc-185396 severity-high targetmilestone-inin2004 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
summary: |
- s390x/pci: s390_pci_mmio_write/read fail when MIO instructions are - available + [UBUNTU 20.04] s390x/pci: s390_pci_mmio_write/read fail when MIO + instructions are available |
description: | updated |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
Changed in linux (Ubuntu): | |
status: | New → Incomplete |
assignee: | Skipper Bug Screeners (skipper-screen-team) → Canonical Kernel Team (canonical-kernel-team) |
description: | updated |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Focal): | |
status: | New → In Progress |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
------- Comment From <email address hidden> 2020-04-21 09:41 EDT------- mmio_write/ read system calls, the system calls fail with an "Unable to handle kernel pointer dereference in virtual kernel address space" in the kernel.
One of the PCI enhancements on Z15 are the enhanced PCI load/store instructions which can be executed directly from user space code. When these instructions are available and preexisting user space code still uses the old s390_pci_
This issue affects distributions which have the enablement for Z15 PCI enhancements and where customers run workloads which accesses PCI adapters from user space, e.g. RDMA applications.
To solve this, the system call implementation needs to be enhanced to provide to execute enhanced PCI load/store instructions on behalf of the user space application making use of the mappings into its virtual address space