From: Jamie Iles <jamie@nuviainc.com>
To: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com
Cc: netdev@vger.kernel.org
Subject: IXGBE VF DMA error handling bug(?)
Date: Mon, 19 Jul 2021 18:44:30 +0100 [thread overview]
Message-ID: <YPW5/jndPPpnpWYo@hazel> (raw)
Hi folks,
Whilst reviewing the IXGBE driver I found a potential bug for VF DMA
error handling.
83c61fa97a7d ("ixgbe: Add protection from VF invalid target DMA") added
a workaround for an invalid VF DMA address that would read the TLP
header from the PCIe RP to get the requester ID and then reset the
originating VF. 144384649dc1 ("ixgbe: Check config reads for removal")
then added checks for removal when performing config accesses, but
changed:
bdev = pdev->bus->self;
while (bdev && (pci_pcie_type(bdev) != PCI_EXP_TYPE_ROOT_PORT))
bdev = bdev->bus->self;
...
- pci_read_config_dword(bdev, pos + PCI_ERR_HEADER_LOG, &dw0);
- pci_read_config_dword(bdev, pos + PCI_ERR_HEADER_LOG + 4, &dw1);
- pci_read_config_dword(bdev, pos + PCI_ERR_HEADER_LOG + 8, &dw2);
- pci_read_config_dword(bdev, pos + PCI_ERR_HEADER_LOG + 12, &dw3);
+ dw0 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG);
+ dw1 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 4);
+ dw2 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 8);
+ dw3 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 12);
so now the header is being read from NIC config space rather than the
root port.
If correct, the fix should be as simple as reverting those accessor
changes in ixgbe_io_error_detected.
Thanks,
Jamie
reply other threads:[~2021-07-19 17:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YPW5/jndPPpnpWYo@hazel \
--to=jamie@nuviainc.com \
--cc=anthony.l.nguyen@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.