Request to revert SAUCE patches in the 18.04 SRU and update with upstream version

Bug #1768431 reported by bugproxy on 2018-05-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Medium
Canonical Kernel Team
linux (Ubuntu)
Medium
Joseph Salisbury
Bionic
Medium
Joseph Salisbury
Cosmic
Medium
Joseph Salisbury

Bug Description

== SRU Justification ==
This SRU was requested by IBM. It contains one SAUCE patch and three
commits from linux.next.

IBM requested that we revert a set of SAUCE patches from 18.04 and
replace them with patches from linux-next. Based on review comments,
there has been minor changes from the original SAUCE patches and the
versions in linux-next.

The first SAUCE patch contains all the changes between the current version
of SAUCE patches for latest cxlflash patches in bionic and the latest
version accepted by the community. This only has the needed changes and
makes it so we don't have to revert and re-apply a high number of patches.
In addition to the SAUCE patch, IBM requested the 3 additional new patches
from the linux-next tree.

== Fixes ==
UBUNTU: SAUCE: (no-up) cxlflash: OCXL diff between v2 and v3
a3feb6ef50de ("scsi: cxlflash: Synchronize reset and remove ops")
9a597cd4c0ce ("scsi: cxlflash: Remove commmands from pending list on timeout)"
d2d354a606d5 ("scsi: cxlflash: Handle spurious interrupts")

== Regression Potential ==
Medium. All the patches are specific to the cxlflash driver, but there
are four of them and one is a SAUCE patch.

== Test Case ==
A test kernel was built with these patches and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

== Comment: #0 - UMA KRISHNAN <email address hidden> - 2018-04-30 14:41:30 ==
---Problem Description---
Request to revert SAUCE patches from 18.04 and apply the patches from next/master.

Below set of cxlflash patches were submitted to Canonical after they were sent to the community. Based on review comments, there has been minor changes from that version. This BZ is to request reverting those SAUCE patches with the ones that are queued in next/master tree for 4.18.

- SAUCE: cxlflash: Preserve number of interrupts for master contexts
- SAUCE: cxlflash: Avoid clobbering context control register value
- SAUCE: cxlflash: Add argument identifier names
- SAUCE: cxlflash: Introduce OCXL backend
- SAUCE: cxlflash: Hardware AFU for OCXL
- SAUCE: cxlflash: Read host function configuration
- SAUCE: cxlflash: Setup function acTag range
- SAUCE: cxlflash: Read host AFU configuration
- SAUCE: cxlflash: Setup AFU acTag range
- SAUCE: cxlflash: Setup AFU PASID
- SAUCE: cxlflash: Adapter context support for OCXL
- SAUCE: cxlflash: Use IDR to manage adapter contexts
- SAUCE: cxlflash: Support adapter file descriptors for OCXL
- SAUCE: cxlflash: Support adapter context discovery
- SAUCE: cxlflash: Support image reload policy modification
- SAUCE: cxlflash: MMIO map the AFU
- SAUCE: cxlflash: Support starting an adapter context
- SAUCE: cxlflash: Support process specific mappings
- SAUCE: cxlflash: Support AFU state toggling
- SAUCE: cxlflash: Support reading adapter VPD data
- SAUCE: cxlflash: Setup function OCXL link
- SAUCE: cxlflash: Setup OCXL transaction layer
- SAUCE: cxlflash: Support process element lifecycle
- SAUCE: cxlflash: Support AFU interrupt management
- SAUCE: cxlflash: Support AFU interrupt mapping and registration
- SAUCE: cxlflash: Support starting user contexts
- SAUCE: cxlflash: Support adapter context polling
- SAUCE: cxlflash: Support adapter context reading
- SAUCE: cxlflash: Support adapter context mmap and release
- SAUCE: cxlflash: Support file descriptor mapping
- SAUCE: cxlflash: Introduce object handle fop
- SAUCE: cxlflash: Setup LISNs for user contexts
- SAUCE: cxlflash: Setup LISNs for master contexts
- SAUCE: cxlflash: Update synchronous interrupt status bits
- SAUCE: cxlflash: Introduce OCXL context state machine
- SAUCE: cxlflash: Register for translation errors
- SAUCE: cxlflash: Support AFU reset
- SAUCE: cxlflash: Enable OCXL operations

Also, there are 3 additional patches added to end of this series that we would like to request being pulled into the SRU stream. These 3 patches address bug fixes.
The commit ids for the patches queued in next/master tree are,

768999d6b1eadc6a13b1fba1886f1708f433d82b scsi: cxlflash: Preserve number of interrupts for master contexts
6c2b116dd38e3fbda10c3e3d5ac80ea7442e4f4d scsi: cxlflash: Avoid clobbering context control register value
fcace1d5e11f518c6f91dd245fa1ac37393b47d3 scsi: cxlflash: Add argument identifier names
863dbdc0552f8bc100df48bb231089c382b89004 scsi: cxlflash: Introduce OCXL backend
f2180daa83950ff8183f70b1b78d67cb13fd90b2 scsi: cxlflash: Hardware AFU for OCXL
1042535633554592d7d95a9cf83d2940803689e0 scsi: cxlflash: Read host function configuration
ba84823a8b448207659753ae4f9c8b956923bada scsi: cxlflash: Setup function acTag range
f55ced2dcd00ab257a2bb25eee619b75cda24817 scsi: cxlflash: Read host AFU configuration
c5a8fec11278e245136c7f696c914269c58a6000 scsi: cxlflash: Setup AFU acTag range
b42d68d728a63337bcb7860b59e6458946d94a84 scsi: cxlflash: Setup AFU PASID
de25ec59a75802584aac97aed05fd94094dbbb58 scsi: cxlflash: Adapter context support for OCXL
a76fc993e399f54b37f46107a31e817c779f2b82 scsi: cxlflash: Use IDR to manage adapter contexts
09f35da5fe218baf73f7b4efd281e2c19490512c scsi: cxlflash: Support adapter file descriptors for OCXL
17f9335bc59c1cf8f93617eee137e745abd71a3f scsi: cxlflash: Support adapter context discovery
a5cfe355f23d4410d69af0e5b196b095463a0b4b scsi: cxlflash: Support image reload policy modification
0c62e7c091a4e0a01a7c6027fe719625ab2f521e scsi: cxlflash: MMIO map the AFU
f39bab766ea4f0b3d5888fdd7d66babd7bef3966 scsi: cxlflash: Support starting an adapter context
bef2014e8bd6391988b588acb969b48133072f17 scsi: cxlflash: Support process specific mappings
58b43437bd85565c74c2b6975cc71003b93f3559 scsi: cxlflash: Support AFU state toggling
08d6154b6064021db6e9b822559f3accfcb0a8f7 scsi: cxlflash: Support reading adapter VPD data
c11b0b435a7b1001d2451cde8dc249cc5ef614a0 scsi: cxlflash: Setup function OCXL link
fad7fd669ac666e411682ca28104a15d035bc957 scsi: cxlflash: Setup OCXL transaction layer
8733bd8b329124fa24d717daa2285adeba0ecc70 scsi: cxlflash: Support process element lifecycle
eb249077b3fb27939f57975dac8c7ec719066d3a scsi: cxlflash: Support AFU interrupt management
8c58d224f173941787f635d3e30ce3479802118c scsi: cxlflash: Support AFU interrupt mapping and registration
87b78b7cadd5518593fee714d1c4ad9e67e5f5b1 scsi: cxlflash: Support starting user contexts
65a9b16c95b48388a845513f0e3ef6db99f8068a scsi: cxlflash: Support adapter context polling
6a6093bab2df2e41f558695697077df5d95fa50b scsi: cxlflash: Support adapter context reading
eff344dc47ce1f3f452d34d7e8801c472b7bd5ec scsi: cxlflash: Support adapter context mmap and release
195fc14998630cff370d1f46c4cd5833072dab7d scsi: cxlflash: Support file descriptor mapping
f9662c034e25c973cc38ee5aebfd2516601f5f75 scsi: cxlflash: Introduce object handle fop
3aeb1833e4e2374c22fe1b3d05affe64a95a0839 scsi: cxlflash: Setup LISNs for user contexts
41676671021c361b75da10e8ad16f95e8daa8090 scsi: cxlflash: Setup LISNs for master contexts
e05df99313b8fedad51f98e74c751a33fbfb6bad scsi: cxlflash: Update synchronous interrupt status bits
6d11971a38cce007899586e98667061a1fddfc23 scsi: cxlflash: Introduce OCXL context state machine
d5c11f5c33fb3edfe6031d38dc650fc5017c4a40 scsi: cxlflash: Register for translation errors
41ef5d04768990f3ab64a8fec581217df65f3f30 scsi: cxlflash: Support AFU reset
6a7969eda1cf4bcb8f8eb8f11a2ebdff24a39ac5 scsi: cxlflash: Enable OCXL operations
7a3593e6560019ca1c3528eba1c2362cf5bddef4 scsi: cxlflash: Synchronize reset and remove ops
bcfd01d97570d8a12c6391cc0ee7f0863b81c6d4 scsi: cxlflash: Remove commmands from pending list on timeout
d54f3841703b313416c08a04848e4d97aa6a8355 scsi: cxlflash: Handle spurious interrupts

If you would rather handpick the specific commits that had deviations, please let me know and I can list them. Since 18.04 is a long term release it would help to be in sync with the upstream set of patches to avoid back porting issues in the future. Please let me know if you have questions/concerns. Thanks a LOT !

Contact Information = <email address hidden>

---uname output---
n/a

Machine Type = n/a

---Debugger---
A debugger is not configured

Stack trace output:
 no

Oops output:
 no

System Dump Info:
  The system is not configured to capture a system dump.

*Additional Instructions for <email address hidden>:
-Attach sysctl -a output output to the bug.

CVE References

bugproxy (bugproxy) on 2018-05-02
tags: added: architecture-ppc64le bugnameltc-167320 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → kernel-package (Ubuntu)
Changed in ubuntu-power-systems:
importance: Undecided → Medium
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
tags: added: triage-g
Changed in ubuntu-power-systems:
status: New → Triaged
affects: kernel-package (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Bionic):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu Bionic):
status: New → Triaged
Changed in linux (Ubuntu):
status: New → Triaged
Joseph Salisbury (jsalisbury) wrote :

It would be preferable to only handpick the specific commits that had deviations. It would be great if you could list those specific commits.

Changed in linux (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Joseph Salisbury (jsalisbury)

------- Comment From <email address hidden> 2018-05-08 13:56 EDT-------
Below are the SAUCE patches to be reverted with the relevant commits (listed below each SAUCE patch) from next/master tree. Please note that the commit IDs in next/master is subject to changes when it is rebased. But the patch description should stay the same. Below are the current commit IDs.

Also, there is a possibility to see merge conflicts since selective patches are being reverted in the series. If you face issues, please let me know how I can help.

Total changes for revert is 3 patches and request to pull in 3 new patch requests are also listed at the end of the comment.

1. SAUCE: cxlflash: Read host function configuration
replaced with,
e9dfceda92ae6c59041e7256de137b6132f37cdf scsi: cxlflash: Read host function configuration

2. SAUCE: cxlflash: Read host AFU configuration
replaced with,
9cc84291be6ee6c1336d38baf0acb03fe087fd28 scsi: cxlflash: Read host AFU configuration

3. SAUCE: cxlflash: Use IDR to manage adapter contexts
replaced with,
429ebfa69b8a456194cd424772dace40b1c3f963 scsi: cxlflash: Use IDR to manage adapter contexts

Three new commits,
4. a3feb6ef50def7c91244d7bd15a3625b7b49b81f scsi: cxlflash: Synchronize reset and remove ops
5. 9a597cd4c0cebd61657f7449cb8bcb681f464500 scsi: cxlflash: Remove commmands from pending list on timeout
6. d2d354a606d5309fbfe81d5fca01122159e38c6e scsi: cxlflash: Handle spurious interrupts

Joseph Salisbury (jsalisbury) wrote :

I built a Bionic test kernel with the three commits reverted and three new patches posted in comment #2.

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1768431

Can you test this kernel and see if it resolves this bug?

Note about installing test kernels:
• If the test kernel is prior to 4.15(Bionic) you need to install the linux-image and linux-image-extra .deb packages.
• If the test kernel is 4.15(Bionic) or newer, you need to install the linux-image-unsigned, linux-modules and linux-modules-extra .deb packages.

Thanks in advance!

Joseph Salisbury (jsalisbury) wrote :

Also, the three reverts did not revert cleanly, so I had to backport them. I attached them to this bug for review.

Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Bionic):
status: Triaged → In Progress
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-11 15:32 EDT-------
Can you please clarify that you have replaced the reverted patches with the patch from next/master tree ? I have provided the replacement commits for each of the revert request. Can you please confirm if this is done ?

I looked through the attachments. The reverts are not clean. It has reverted more than it should. But I doubt if you can selectively revert those patches because the following patches are built on top of it.

I think easiest and cleanest solution might be to revert all the cxlflash SAUCE patches and apply the ones from next/master. Another option is for me to create a new patch with just the differences. Please let me know what you recommend.

Joseph Salisbury (jsalisbury) wrote :

Yes, the patches were reverted, then replaced with the ones you listed from next/master tree. As you noticed, they did not revert cleanly, so I had to back port and remove code that was added by newer commits.

If you could create a new patch with just the diffs that would be great! I could revert all the cxlflash SAUCE patches and apply the ones from next, but that would make it more difficult to get the changes into a stable release. Changes to a stable release should be as minimal as possible.

Just let me know if you are able to create a new patch with just the diffs or not. If you can not, I'll build a test kernel with a revert of all the cxlflash SAUCE patches and apply the ones from next/master.

Changed in ubuntu-power-systems:
status: Triaged → In Progress
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-15 16:57 EDT-------
I will work on the diff patch and you can apply it as additional SAUCE patch to come up to speed with the version we have in next/master and then apply the 3 new patches. I will update the BZ when the SAUCE patch with the diff is ready. Thanks !!

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-17 17:02 EDT-------
I'm attaching the diff patch that contains all the changes between the current version of SAUCE patches for latest cxlflash patches in bionic and the latest version accepted by the community. This only has the changes for the 3 differences updated earlier. After applying this diff patch, please apply the 3 additional new patches from the next/master tree. The 3 patches needed on top of this diff patch are,

a3feb6ef50def7c91244d7bd15a3625b7b49b81f scsi: cxlflash: Synchronize reset and remove ops
9a597cd4c0cebd61657f7449cb8bcb681f464500 scsi: cxlflash: Remove commmands from pending list on timeout
d2d354a606d5309fbfe81d5fca01122159e38c6e scsi: cxlflash: Handle spurious interrupts

Please let me know if you find issues applying them or if you have questions.

------- Comment (attachment only) From <email address hidden> 2018-05-17 17:03 EDT-------

Joseph Salisbury (jsalisbury) wrote :

I built a Bionic test kernel with your diff patch and the three new patches on top.

The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1768431

Can you test this kernel and see if it resolves this bug?

------- Comment From <email address hidden> 2018-05-23 17:21 EDT-------
I'm getting errors while installing the given packages. Do I need to upgrade my box with a specific release ? Please let me know.

Joseph Salisbury (jsalisbury) wrote :

What type or errors are you seeing? Can you post them? You need to install the packages in this order:

linux-modules-4.15.0-20-generic_4.15.0-20.22~lp1768431DiffPatched_ppc64el.deb
linux-modules-extra-4.15.0-20-generic_4.15.0-20.22~lp1768431DiffPatched_ppc64el.deb
linux-image-unsigned-4.15.0-20-generic_4.15.0-20.22~lp1768431DiffPatched_ppc64el.deb

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-29 18:33 EDT-------
I was able to install the kernel and run regression. It looks good.

I do have 7 more patches that were added recently to upstream for cxlflash. We would like to have them included in bionic SRU as well. Details are given below. Please let me know if you can apply on top of this using this bugzilla or if you want me to open a new request for the same.

Current commit ids of the patches in next/master tree -

e0f76ad13085b730091256d7a2fbe3555f0686df scsi: cxlflash: Yield to active send threads
d58188c306a010d32a250ae532c3daaae8c57346 scsi: cxlflash: Limit the debug logs in the IO path
32a9ae415b8a4258140312f91c71324950d9eba4 scsi: cxlflash: Acquire semaphore before invoking ioctl services
e63a8d886d346e83607e4495ec21f1a0ca6398a2 scsi: cxlflash: Use local mutex for AFU serialization
5e12397a9706391543e87cf088fff89fe05f0ad0 scsi: cxlflash: Add include guards to backend.h
de5d35aff5b34bc91a83adb0bf1788d3d23e92f4 scsi: cxlflash: Abstract hardware dependent assignments
cd43c221bb5eb5a6400a62ae44a9979c8fc6c87e scsi: cxlflash: Isolate external module dependencies

Joseph Salisbury (jsalisbury) wrote :

It would probably be best to open a new bug with a reason why they are needed for the SRU . That way we can keep the two separate. I'll submit an SRU request for this specific bug.

Joseph Salisbury (jsalisbury) wrote :
description: updated
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Brad Figg (brad-figg) 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
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-06-15 01:44 EDT-------
UMA,

Can you please verify and update the bug

description: updated
tags: added: verification-done-bionic
removed: verification-needed-bionic
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-06-15 17:03 EDT-------
I have verified. It looks good. I will add the required tag as well.

Changed in ubuntu-power-systems:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (49.5 KiB)

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

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

  * linux: 4.15.0-24.26 -proposed tracker (LP: #1776338)

  * Bionic update: upstream stable patchset 2018-06-06 (LP: #1775483)
    - drm: bridge: dw-hdmi: Fix overflow workaround for Amlogic Meson GX SoCs
    - i40e: Fix attach VF to VM issue
    - tpm: cmd_ready command can be issued only after granting locality
    - tpm: tpm-interface: fix tpm_transmit/_cmd kdoc
    - tpm: add retry logic
    - Revert "ath10k: send (re)assoc peer command when NSS changed"
    - bonding: do not set slave_dev npinfo before slave_enable_netpoll in
      bond_enslave
    - ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy
    - ipv6: sr: fix NULL pointer dereference in seg6_do_srh_encap()- v4 pkts
    - KEYS: DNS: limit the length of option strings
    - l2tp: check sockaddr length in pppol2tp_connect()
    - net: validate attribute sizes in neigh_dump_table()
    - llc: delete timers synchronously in llc_sk_free()
    - tcp: don't read out-of-bounds opsize
    - net: af_packet: fix race in PACKET_{R|T}X_RING
    - tcp: md5: reject TCP_MD5SIG or TCP_MD5SIG_EXT on established sockets
    - net: fix deadlock while clearing neighbor proxy table
    - team: avoid adding twice the same option to the event list
    - net/smc: fix shutdown in state SMC_LISTEN
    - team: fix netconsole setup over team
    - packet: fix bitfield update race
    - tipc: add policy for TIPC_NLA_NET_ADDR
    - pppoe: check sockaddr length in pppoe_connect()
    - vlan: Fix reading memory beyond skb->tail in skb_vlan_tagged_multi
    - amd-xgbe: Add pre/post auto-negotiation phy hooks
    - sctp: do not check port in sctp_inet6_cmp_addr
    - amd-xgbe: Improve KR auto-negotiation and training
    - strparser: Do not call mod_delayed_work with a timeout of LONG_MAX
    - amd-xgbe: Only use the SFP supported transceiver signals
    - strparser: Fix incorrect strp->need_bytes value.
    - net: sched: ife: signal not finding metaid
    - tcp: clear tp->packets_out when purging write queue
    - net: sched: ife: handle malformed tlv length
    - net: sched: ife: check on metadata length
    - llc: hold llc_sap before release_sock()
    - llc: fix NULL pointer deref for SOCK_ZAPPED
    - net: ethernet: ti: cpsw: fix tx vlan priority mapping
    - virtio_net: split out ctrl buffer
    - virtio_net: fix adding vids on big-endian
    - KVM: s390: force bp isolation for VSIE
    - s390: correct module section names for expoline code revert
    - microblaze: Setup dependencies for ASM optimized lib functions
    - commoncap: Handle memory allocation failure.
    - scsi: mptsas: Disable WRITE SAME
    - cdrom: information leak in cdrom_ioctl_media_changed()
    - m68k/mac: Don't remap SWIM MMIO region
    - block/swim: Check drive type
    - block/swim: Don't log an error message for an invalid ioctl
    - block/swim: Remove extra put_disk() call from error path
    - block/swim: Rename macros to avoid inconsistent inverted logic
    - block/swim: Select appropriate drive on device open
    - block/swim: Fix array bounds check
    - block/swim: Fix IO error at end of medium
    -...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Cosmic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Cosmic):
status: Fix Committed → Fix Released
bugproxy (bugproxy) on 2019-02-11
tags: added: targetmilestone-inin18041
removed: targetmilestone-inin---
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers