linux-azure: Add Mana network driver

Bug #1928788 reported by Tim Gardner
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned
Groovy
Invalid
Undecided
Unassigned
linux-azure (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Tim Gardner
Groovy
Fix Released
Medium
Tim Gardner
linux-azure-5.8 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Invalid
Undecided
Unassigned

Bug Description

SRU Justification

[Impact]

Microsoft has requested the addition of the "mana" driver from Linux v5.11
https://canonical.my.salesforce.com/5004K000005pZQCQA2

[Fix]

This patch set consists of 5 patches that are now in mainline.

The patches add the VF driver for Microsoft Azure Network Adapter (MANA), and also changes the hv_netvsc driver's netvsc/VF binding logic to check both the MAC address and the serial number (this is required by the MANA VF driver).

Microsoft would like to request the following 5 patches in all supported releases:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64ff412ad41fe3a5bf759ff4844dc1382176485c

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ca9c54d2d6a5ab2430c4eda364c77125d62e5e0f

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=55cdc26a91ac270887583945aef2bd460a2805f7

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=45b102dd81491e30ac7596b5515856141f99319f

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d90a94680bc0a8069d93282bc5f2966d00b9c4a4

[Test Plan]

2021-05-17 15:25 UTC-
-We tested the two versions of mana.ko:

root@decui-u2004-vf:~# uname -a
Linux decui-u2004-vf 5.4.0-1048-azure #50~sf00310147.1-Ubuntu SMP Tue May 11 02:06:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@decui-u2004-vf:~# modinfo mana | grep filename
filename: /lib/modules/5.4.0-1048-azure/kernel/drivers/net/ethernet/microsoft/mana/mana.ko

root@decui-u2004-vf:~# uname -a
Linux decui-u2004-vf 5.8.0-1032-azure #34~SF00310147.1-Ubuntu SMP Tue May 11 02:01:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@decui-u2004-vf:~# modinfo mana | grep filename
filename: /lib/modules/5.8.0-1032-azure/kernel/drivers/net/ethernet/microsoft/mana/mana.ko

Everything worked as expected in our testing:
1. The MANA driver loads and unloads multiple times without any issue.
2. iperf TX/RX tests run without any issue, and the performance numbers are on par with what we get with the latest mainline kernel: the TX number is pretty good; the RX number is sometimes not great but this is a known issue with the latest mainline kernel as well.
3. "ethtool -S" and "ethtool -L" work as expected.
4. When iperf TX/RX tests are running, changing the number of the MANA NIC TX/RX queues and unloading/reloading the MANA driver work without any issue.

[Where problems could occur]

The driver may have bug(s) that cause a kernel crash.

Tim Gardner (timg-tpi)
summary: - Add Mana network driver
+ linux-azure: Add Mana network driver
tags: added: bot-stop-nagging
Tim Gardner (timg-tpi)
description: updated
description: updated
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Changed in linux (Ubuntu Focal):
status: New → Invalid
Changed in linux (Ubuntu Groovy):
status: New → Invalid
Changed in linux-azure (Ubuntu):
status: New → Fix Released
Changed in linux-azure (Ubuntu Focal):
status: New → In Progress
Changed in linux-azure (Ubuntu Groovy):
status: New → In Progress
Changed in linux (Ubuntu):
status: New → Fix Released
Changed in linux-azure (Ubuntu Focal):
importance: Undecided → Medium
Changed in linux-azure (Ubuntu Groovy):
importance: Undecided → Medium
Changed in linux-azure (Ubuntu Focal):
assignee: nobody → Tim Gardner (timg-tpi)
Changed in linux-azure (Ubuntu Groovy):
assignee: nobody → Tim Gardner (timg-tpi)
Tim Gardner (timg-tpi)
Changed in linux-azure (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux-azure (Ubuntu Groovy):
status: In Progress → Fix Committed
Tim Gardner (timg-tpi)
Changed in linux-azure-5.8 (Ubuntu Focal):
status: New → In Progress
Changed in linux-azure-5.8 (Ubuntu Groovy):
status: New → Invalid
Changed in linux-azure-5.8 (Ubuntu):
status: New → Invalid
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
Dexuan Cui (decui) wrote :

I installed and tested the 5.8.0-1034-azure kernel and it worked as expected.

I created a Ubuntu 20.04 VM and installed the “5.8.0-1034” kernel this way:
1. Enable the “proposed” kernel by running the below as “root” (refer to https://wiki.ubuntu.com/Testing/EnableProposed):

cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

2. apt-get update
3. apt-get install linux-image-5.8.0-1034-azure linux-modules-extra-5.8.0-1034-azure
4. reboot

Now I saw
root@decui-u2004-tmp:~# uname -r
5.8.0-1034-azure
root@decui-u2004-tmp:~# modinfo mana | grep mana.ko
filename: /lib/modules/5.8.0-1034-azure/kernel/drivers/net/ethernet/microsoft/mana/mana.ko

5. I did the tests described in the "Bug Description" and it all worked as expected.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Marking verification done according to #3.

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

This bug was fixed in the package linux-azure - 5.8.0-1036.38

---------------
linux-azure (5.8.0-1036.38) groovy; urgency=medium

  [ Ubuntu: 5.8.0-59.66 ]

  * UAF on CAN J1939 j1939_can_recv (LP: #1932209)
    - SAUCE: can: j1939: delay release of j1939_priv after synchronize_rcu
  * UAF on CAN BCM bcm_rx_handler (LP: #1931855)
    - SAUCE: can: bcm: delay release of struct bcm_op after synchronize_rcu

  [ Ubuntu: 5.8.0-57.64 ]

  * groovy/linux: 5.8.0-57.64 -proposed tracker (LP: #1932047)
  * pmtu.sh from selftests.net in linux ADT test failure with linux/5.8.0-56.63
    (LP: #1931731)
    - net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb

linux-azure (5.8.0-1034.36) groovy; urgency=medium

  * groovy/linux-azure: 5.8.0-1034.36 -proposed tracker (LP: #1930041)

  * linux-azure: Add Mana network driver (LP: #1928788)
    - hv_netvsc: Make netvsc/VF binding check both MAC and serial number
    - [Config] azure: CONFIG_MICROSOFT_MANA=m
    - net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)
    - net: mana: remove redundant initialization of variable err
    - net: mana: fix PCI_HYPERV dependency
    - net: mana: Use int to check the return value of mana_gd_poll_cq()

  [ Ubuntu: 5.8.0-56.63 ]

  * groovy/linux: 5.8.0-56.63 -proposed tracker (LP: #1930052)
  * Packaging resync (LP: #1786013)
    - update dkms package versions
  * scsi: storvsc: Parameterize number hardware queues (LP: #1930626)
    - scsi: storvsc: Parameterize number hardware queues
  * CVE-2021-33200
    - bpf: Wrap aux data inside bpf_sanitize_info container
    - bpf: Fix mask direction swap upon off reg sign change
    - bpf: No need to simulate speculative domain for immediates
  * CVE-2021-3490
    - SAUCE: Revert "UBUNTU: SAUCE: bpf: verifier: fix ALU32 bounds tracking with
      bitwise ops"
    - gpf: Fix alu32 const subreg bound tracking on bitwise operations
  * CVE-2021-3489
    - SAUCE: Revert "UBUNTU: SAUCE: bpf: prevent writable memory-mapping of read-
      only ringbuf pages"
    - bpf: Prevent writable memory-mapping of read-only ringbuf pages
  * Realtek USB hubs in Dell WD19SC/DC/TB fail to work after exiting s2idle
    (LP: #1928242)
    - USB: Verify the port status when timeout happens during port suspend
  * CVE-2020-26145
    - ath10k: drop fragments with multicast DA for SDIO
    - ath10k: add CCMP PN replay protection for fragmented frames for PCIe
    - ath10k: drop fragments with multicast DA for PCIe
  * CVE-2020-26141
    - ath10k: Fix TKIP Michael MIC verification for PCIe
  * CVE-2020-24587
    - ath11k: Clear the fragment cache during key install
  * CVE-2020-24588
    - mac80211: properly handle A-MSDUs that start with an RFC 1042 header
    - cfg80211: mitigate A-MSDU aggregation attacks
    - mac80211: drop A-MSDUs on old ciphers
    - ath10k: drop MPDU which has discard flag set by firmware for SDIO
  * CVE-2020-26139
    - mac80211: do not accept/forward invalid EAPOL frames
  * CVE-2020-24586 // CVE-2020-24587 // CVE-2020-24587 for such cases.
    - mac80211: extend protection against mixed key and fragment cache attacks
  * CVE-2020-24586 // CVE-2020-24587
    - mac80211: prevent mixed k...

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

This bug was fixed in the package linux-azure - 5.4.0-1051.53

---------------
linux-azure (5.4.0-1051.53) focal; urgency=medium

  [ Ubuntu: 5.4.0-77.86 ]

  * UAF on CAN J1939 j1939_can_recv (LP: #1932209)
    - SAUCE: can: j1939: delay release of j1939_priv after synchronize_rcu
  * UAF on CAN BCM bcm_rx_handler (LP: #1931855)
    - SAUCE: can: bcm: delay release of struct bcm_op after synchronize_rcu

  [ Ubuntu: 5.4.0-76.85 ]

  * focal/linux: 5.4.0-76.85 -proposed tracker (LP: #1932123)
  * Upstream v5.9 introduced 'module' patches that removed exported symbols
    (LP: #1932065)
    - SAUCE: Revert "modules: inherit TAINT_PROPRIETARY_MODULE"
    - SAUCE: Revert "modules: return licensing information from find_symbol"
    - SAUCE: Revert "modules: rename the licence field in struct symsearch to
      license"
    - SAUCE: Revert "modules: unexport __module_address"
    - SAUCE: Revert "modules: unexport __module_text_address"
    - SAUCE: Revert "modules: mark each_symbol_section static"
    - SAUCE: Revert "modules: mark find_symbol static"
    - SAUCE: Revert "modules: mark ref_module static"

 -- Stefan Bader <email address hidden> Thu, 17 Jun 2021 19:43:15 +0200

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

This bug was fixed in the package linux-azure-5.8 - 5.8.0-1036.38~20.04.1

---------------
linux-azure-5.8 (5.8.0-1036.38~20.04.1) focal; urgency=medium

  [ Ubuntu: 5.8.0-1036.38 ]

  * UAF on CAN J1939 j1939_can_recv (LP: #1932209)
    - SAUCE: can: j1939: delay release of j1939_priv after synchronize_rcu
  * UAF on CAN BCM bcm_rx_handler (LP: #1931855)
    - SAUCE: can: bcm: delay release of struct bcm_op after synchronize_rcu
  * groovy/linux: 5.8.0-57.64 -proposed tracker (LP: #1932047)
  * pmtu.sh from selftests.net in linux ADT test failure with linux/5.8.0-56.63
    (LP: #1931731)
    - net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb

 -- Stefan Bader <email address hidden> Thu, 17 Jun 2021 15:45:58 +0200

Changed in linux-azure-5.8 (Ubuntu Focal):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.