lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Nov 2013 15:05:42 -0700
From:	Myron Stowe <myron.stowe@...il.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	stable@...r.kernel.org, Myron Stowe <myron.stowe@...hat.com>,
	linux-pci <linux-pci@...r.kernel.org>,
	Amos Kong <kongjianjun@...il.com>,
	Adam Lee <adam.lee@...onical.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Yuval Mintz <yuvalmin@...adcom.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	Thomas Renninger <trenn@...e.de>
Subject: Re: [PATCH v2 3/3] PCI: Support PCIe Capability Slot registers only
 for ports with slots

On Tue, Nov 19, 2013 at 2:35 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> Commit 6d3a1741f1e648cfbd5a0cc94477a0d5004c6f5e upstream.  This is part
> of the fix for https://bugzilla.kernel.org/show_bug.cgi?id=65211
>
> Previously we allowed callers to access Slot Capabilities, Status, and
> Control for Root Ports even if the Root Port did not implement a slot.
> This seems dubious because the spec only requires these registers if a
> slot is implemented.
>
> It's true that even Root Ports without slots must have *space* for these
> slot registers, because the Root Capabilities, Status, and Control
> registers are after the slot registers in the capability.  However,
> for a v1 PCIe Capability, the *semantics* of the slot registers are
> undefined unless a slot is implemented.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> Reviewed-By: Jiang Liu <jiang.liu@...wei.com>
> CC: stable@...r.kernel.org      # v3.7+
> ---
>  drivers/pci/access.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/access.c b/drivers/pci/access.c
> index 9a46fa9135d9..061da8c3ab4b 100644
> --- a/drivers/pci/access.c
> +++ b/drivers/pci/access.c
> @@ -497,9 +497,9 @@ static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
>  {
>         int type = pci_pcie_type(dev);
>
> -       return type == PCI_EXP_TYPE_ROOT_PORT ||
> -              (type == PCI_EXP_TYPE_DOWNSTREAM &&
> -               pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT);
> +       return (type == PCI_EXP_TYPE_ROOT_PORT ||
> +               type == PCI_EXP_TYPE_DOWNSTREAM) &&
> +              pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT;
>  }
>
>  static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev)
>

Acked-by: Myron Stowe <myron.stowe@...hat.com>

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ