Verified on Bionic with the following test case:
$ echo 64 | sudo tee /sys/class/net/ens1f0/device/sriov_numvfs && virsh 
attach-interface valuable-bluefish hostdev 0000:08:02.6 --managed --live

On 4.15.0-72.81, I get the following GPF:
[119044.656412] general protection fault: 0000 [#1] SMP PTI
[119044.656455] Modules linked in: i40evf vfio_pci vfio_virqfd vfio_iommu_type1 
vfio vhost_net vhost tap ebtable_filter ebtables devlink ip6t
able_filter ip6_tables kvm_intel binfmt_misc ipt_REJECT nf_reject_ipv4 
xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_CHECKSUM xt_comm
ent xt_tcpudp iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 
nf_nat_ipv4 nf_nat nf_conntrack iptable_filter bridge stp llc dummy
 ixgbevf ipmi_ssif nls_iso8859_1 intel_rapl sb_edac x86_pkg_temp_thermal 
intel_powerclamp coretemp kvm irqbypass intel_cstate intel_rapl_perf
 lpc_ich hpilo ioatdma shpchp ipmi_si ipmi_devintf ipmi_msghandler mac_hid 
acpi_power_meter sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core
iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 
btrfs zstd_compress raid10
[119044.656929]  raid456 async_raid6_recov async_memcpy async_pq async_xor 
async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear mgag2
00 i2c_algo_bit crct10dif_pclmul crc32_pclmul ttm ghash_clmulni_intel ses pcbc 
enclosure drm_kms_helper aesni_intel syscopyarea aes_x86_64 cr
ypto_simd sysfillrect glue_helper cryptd sysimgblt ixgbe fb_sys_fops i40e tg3 
dca drm nvme ptp hpsa pps_core nvme_core mdio scsi_transport_sa
s wmi [last unloaded: kvm_intel]
[119044.657204] CPU: 11 PID: 10300 Comm: libvirtd Not tainted 4.15.0-72-generic 
#81-Ubuntu
[119044.657255] Hardware name: HP ProLiant DL360 Gen9, BIOS P89 05/06/2015
[119044.657310] RIP: 0010:i40e_sync_vsi_filters+0x95/0xd00 [i40e]
[119044.657349] RSP: 0018:ffffbcc5479fb718 EFLAGS: 00010202
[119044.657385] RAX: 77b7ed74a738c96d RBX: ffff9aad58382000 RCX: 
0000000000000000
[119044.657431] RDX: 0000000000000001 RSI: 00000000fffffe01 RDI: 
ffff9aad58382000
[119044.657477] RBP: ffffbcc5479fb7b8 R08: 0000000000000000 R09: 
0000000000003494
[119044.657523] R10: 0000000000000000 R11: 0000d9714ff8ecd4 R12: 
ffff9aad58382000
[119044.657569] R13: ffff9aad384662a0 R14: ffff9aad58382a28 R15: 
ffff9aad67b1643c
[119044.657616] FS:  00007fd7aef27700(0000) GS:ffff9aad7f0c0000(0000) 
knlGS:0000000000000000
[119044.657668] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[119044.657706] CR2: 00007fd79001c058 CR3: 0000001029f30001 CR4: 
00000000001626e0
[119044.657752] Call Trace:
[119044.657778]  ? del_timer_sync+0x45/0x50
[119044.657809]  ? __next_timer_interrupt+0xe0/0xe0
[119044.657851]  i40e_ndo_set_vf_mac+0x109/0x2b0 [i40e]
[119044.657890]  do_setlink+0x8a5/0xed0
[119044.657919]  ? kmalloc_large_node+0x3b/0x60
[119044.657951]  ? security_sock_rcv_skb+0x41/0x60
[119044.657986]  rtnl_setlink+0xdc/0x130
[119044.658017]  rtnetlink_rcv_msg+0x221/0x2b0
[119044.658049]  ? aa_label_sk_perm+0x129/0x140
[119044.658081]  ? _cond_resched+0x19/0x40
[119044.658110]  ? rtnl_calcit.isra.25+0x110/0x110
[119044.658142]  netlink_rcv_skb+0x54/0x130
[119044.658172]  rtnetlink_rcv+0x15/0x20
[119044.658198]  netlink_unicast+0x19e/0x240
[119044.658227]  netlink_sendmsg+0x2d1/0x3d0
[119044.658258]  sock_sendmsg+0x3e/0x50
[119044.659986]  ___sys_sendmsg+0x2a0/0x2f0
[119044.661666]  ? aa_label_sk_perm+0x129/0x140
[119044.663304]  ? _raw_spin_unlock_bh+0x1e/0x20
[119044.664914]  __sys_sendmsg+0x54/0x90
[119044.666469]  ? __sys_sendmsg+0x54/0x90
[119044.668027]  SyS_sendmsg+0x12/0x20
[119044.669602]  do_syscall_64+0x73/0x130
[119044.671139]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[119044.672643] RIP: 0033:0x7fd7bbcab607
[119044.674095] RSP: 002b:00007fd7aef263d0 EFLAGS: 00000293 ORIG_RAX: 
000000000000002e
[119044.675548] RAX: ffffffffffffffda RBX: 0000000000000016 RCX: 
00007fd7bbcab607
[119044.676968] RDX: 0000000000000000 RSI: 00007fd7aef26430 RDI: 
0000000000000016
[119044.678355] RBP: 00007fd7aef26430 R08: 0000000000000000 R09: 
0000000000000000
[119044.679718] R10: 00007fd7aef264bc R11: 0000000000000293 R12: 
0000000000000000
[119044.681012] R13: 00007fd7aef26430 R14: 00007fd790012a70 R15: 
0000000000000016
[119044.682258] Code: e8 91 38 15 e5 f0 41 0f ba 2c 24 02 72 e8 48 8b 83 40 0f 
00 00 c7 45 8c 00 00 00 00 48 89 85 78 ff ff ff 48 8b 03 48 85
 c0 74 17 <8b> 80 30 02 00 00 8b b3 0c 02 00 00 31 c6 89 83 0c 02 00 00 89
[119044.685125] RIP: i40e_sync_vsi_filters+0x95/0xd00 [i40e] RSP: 
ffffbcc5479fb718
[119044.686379] ---[ end trace f85bde9c06a1d01a ]---

On 4.15.0-73-generic:
$ echo 64 | sudo tee /sys/class/net/ens1f0/device/sriov_numvfs && virsh 
attach-interface valuable-bluefish hostdev 0000:08:02
.6 --managed --live
64
Interface attached successfully
$ uname -r
4.15.0-73-generic

** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1852432

Title:
  i40e: Setting VF MAC address causes General Protection Fault

Status in linux package in Ubuntu:
  Confirmed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed
Status in linux source package in Eoan:
  Fix Committed
Status in linux source package in Focal:
  Confirmed

Bug description:
  [Impact]
   * Creating SR-IOV enabled VMs in Openstack can sometimes trigger the GPF and 
leave system unusable

  [Test Case]
   * Continuously spin up VFs and set MAC address with e.g. ifconfig

  [Fix]
   * The fix updates the VSI pointer passed down to i40e_set_vf_mac function() 
if the adapter is still in reset, preventing the GPF.

  [Regression Potential]
   * Regression potential should be low, as we're now updating the VSI using 
the ID stored in the VF pointer
   * Regressions could arise from issues in VF creation or reset, as that would 
corrupt the new VSI pointer
   * Patch was validated and tested in a production environment

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1852432/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to