[SRU] fnic driver on needs to be updated to 1.6.0.53 on Focal

Bug #1984011 reported by Michael Reed
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Medium
Michael Reed
Focal
Fix Released
Medium
Michael Reed

Bug Description

[Impact]

fNIC driver controls print messages based on the flag fnic_log_level. shost_printk is not controlled via this flag. This issue is resolved by using some of the print macros that have been defined in fnic. This has negligible impact.
The resid was being set irrespective of whether we saw an underflow or not. It needs to be set only when we see an underflow. The impact here is negligible.
When we don't receive link events, we could go into a loop before sending fw reset. The patch for the issue resolves this, and we break out of the loop.
Prior to checking the remote port, fnic driver must check if the io_req is valid. If not, there could be a crash. The patch resolves this issue.

[Fix]
The following patches need to be pulled from upstream to update the fnic driver to 1.6.0.53:

https://marc.info/?l=linux-scsi&m=160591061813369&w=2
https://marc.info/?l=linux-scsi&m=160592183315837&w=2
https://marc.info/?l=linux-scsi&m=160592283315997&w=2
https://marc.info/?l=linux-scsi&m=160592363016122&w=2
https://marc.info/?l=linux-scsi&m=160592616516616&w=2

Here's a description of each issue:

1. https://marc.info/?l=linux-scsi&m=160591061813369&w=2

FNIC_FCS_DBG print is controlled by fnic_log_level flag. Replace shost_printk in fnic_fip_handler_timer with this print so that it can be controlled.

2. https://marc.info/?l=linux-scsi&m=160592183315837&w=2

When fnic is in TRANS ETH state, and when there are no link events, we must not loop before sending fw reset.

3. https://marc.info/?l=linux-scsi&m=160592283315997&w=2

FNIC_MAIN_DBG print is controlled by fnic_log_level flag. Replace shost_printk in fnic_handle_link with this print so that it can be controlled.

4. https://marc.info/?l=linux-scsi&m=160592363016122&w=2

Fix to set scsi_set_resid() only if FCPIO_ICMND_CMPL_RESID_UNDER is set.

5. https://marc.info/?l=linux-scsi&m=160592616516616&w=2

Check for a valid io_req before we check other data.

[Test Plan]

Runnings IOs with multiple link flaps would be a good test case to validate all the patches above. It is suggested to run these IOs with a data integrity check. We do this as a standard practice.

[Where problems could occur]

The print messages are innocuous. It is not expected to run into any issues.
Problems could occur with storage arrays that have a non-standard response.
If the sanity test fails, there could be issues in the scsi midlayer or fnic driver.

All the patches present low regression risk.

[Other Info]
https://code.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/focal/+ref/fnic_cisco_ver3

CVE References

Revision history for this message
Michael Reed (mreed8855) wrote :

I have updated the link with a new test kernel.

https://people.canonical.com/~mreed/cisco/lp_1978247_fnic/

After installing this test kernel you should see kernel version 5.4.0-123.139.

I installed it and verified the updated driver is present.

$ uname -a
Linux hogplum 5.4.0-123-generic #139 SMP Thu Aug 4 21:28:51 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ modinfo fnic
filename: /lib/modules/5.4.0-123-generic/kernel/drivers/scsi/fnic/fnic.ko
version: 1.6.0.53
license: GPL v2

Revision history for this message
Michael Reed (mreed8855) wrote :

Thanks for the new kernel Michael.

I've updated the kernel and verified that the new driver is present.

We're all set. Thanks for your help with this. This bug can be resolved.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1984011

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Focal):
status: New → Incomplete
Michael Reed (mreed8855)
Changed in linux (Ubuntu):
assignee: nobody → Michael Reed (mreed8855)
Changed in linux (Ubuntu Focal):
assignee: nobody → Michael Reed (mreed8855)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Focal):
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: Incomplete → In Progress
Changed in linux (Ubuntu Focal):
status: Incomplete → In Progress
Michael Reed (mreed8855)
description: updated
Stefan Bader (smb)
Changed in linux (Ubuntu):
status: In Progress → Invalid
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-126.142 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!

Michael Reed (mreed8855)
tags: added: verification-done-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (51.9 KiB)

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

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

  * focal/linux: 5.4.0-126.142 -proposed tracker (LP: #1987819)

  * [SRU] fnic driver on needs to be updated to 1.6.0.53 on Focal (LP: #1984011)
    - scsi: fnic: Change shost_printk() to FNIC_FCS_DBG()
    - scsi: fnic: Avoid looping in TRANS ETH on unload
    - scsi: fnic: Change shost_printk() to FNIC_MAIN_DBG()
    - scsi: fnic: Set scsi_set_resid() only for underflow
    - scsi: fnic: Validate io_req before others

  * Focal update: v5.4.203 upstream stable release (LP: #1986999)
    - drm: remove drm_fb_helper_modinit
    - powerpc/ftrace: Remove ftrace init tramp once kernel init is complete
    - kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
    - net: mscc: ocelot: allow unregistered IP multicast flooding
    - ARM: 8989/1: use .fpu assembler directives instead of assembler arguments
    - ARM: 8990/1: use VFP assembler mnemonics in register load/store macros
    - ARM: 8971/1: replace the sole use of a symbol with its definition
    - crypto: arm/sha256-neon - avoid ADRL pseudo instruction
    - crypto: arm/sha512-neon - avoid ADRL pseudo instruction
    - ARM: 8933/1: replace Sun/Solaris style flag on section directive
    - ARM: 8929/1: use APSR_nzcv instead of r15 as mrc operand
    - ARM: OMAP2+: drop unnecessary adrl
    - ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler
    - crypto: arm - use Kconfig based compiler checks for crypto opcodes
    - crypto: arm/ghash-ce - define fpu before fpu registers are referenced
    - Linux 5.4.203

  * Focal update: v5.4.202 upstream stable release (LP: #1986995)
    - random: schedule mix_interrupt_randomness() less often
    - ALSA: hda/via: Fix missing beep setup
    - ALSA: hda/conexant: Fix missing beep setup
    - ALSA: hda/realtek - ALC897 headset MIC no sound
    - ALSA: hda/realtek: Add quirk for Clevo PD70PNT
    - net: openvswitch: fix parsing of nw_proto for IPv6 fragments
    - mmc: sdhci-pci-o2micro: Fix card detect by dealing with debouncing
    - ata: libata: add qc->flags in ata_qc_complete_template tracepoint
    - dm era: commit metadata in postsuspend after worker stops
    - dm mirror log: clear log bits up to BITS_PER_LONG boundary
    - random: quiet urandom warning ratelimit suppression message
    - USB: serial: option: add Telit LE910Cx 0x1250 composition
    - USB: serial: option: add Quectel EM05-G modem
    - USB: serial: option: add Quectel RM500K module support
    - bpf: Fix request_sock leak in sk lookup helpers
    - phy: aquantia: Fix AN when higher speeds than 1G are not advertised
    - bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
    - net/sched: sch_netem: Fix arithmetic in netem_dump() for 32-bit platforms
    - drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf
    - erspan: do not assume transport header is always set
    - net/tls: fix tls_sk_proto_close executed repeatedly
    - udmabuf: add back sanity check
    - x86/xen: Remove undefined behavior in setup_features()
    - MIPS: Remove repetitive increase irq_err_count
    - afs: Fix dynamic root getattr
    - ice: et...

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

This bug is awaiting verification that the linux-xilinx-zynqmp/5.4.0-1020.24 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: kernel-spammed-focal-linux-xilinx-zynqmp verification-needed-focal
removed: verification-done-focal
Revision history for this message
Karan Tilak Kumar (kartilak) wrote :

All verifications have been completed w.r.t this bug.
Is any action needed here?
Please advise.

Thanks,
Karan

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.