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]
Message-ID: <20250116190118.GW5556@nvidia.com>
Date: Thu, 16 Jan 2025 15:01:18 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Tushar Dave <tdave@...dia.com>
Cc: corbet@....net, bhelgaas@...gle.com, paulmck@...nel.org,
	akpm@...ux-foundation.org, thuth@...hat.com, rostedt@...dmis.org,
	xiongwei.song@...driver.com, vidyas@...dia.com,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, vsethi@...dia.com,
	sdonthineni@...dia.com
Subject: Re: [PATCH 1/1] PCI: Fix Extend ACS configurability

On Wed, Jan 15, 2025 at 07:11:25PM -0800, Tushar Dave wrote:
> @@ -1028,10 +1032,15 @@ static void __pci_config_acs(struct pci_dev *dev,
> struct pci_acs *caps,
> 
>         pci_dbg(dev, "ACS mask  = %#06x\n", mask);
>         pci_dbg(dev, "ACS flags = %#06x\n", flags);
> +       pci_dbg(dev, "ACS control = %#06x\n", caps->ctrl);
> +       pci_dbg(dev, "ACS fw_ctrl = %#06x\n", caps->fw_ctrl);
> 
>         /* If mask is 0 then we copy the bit from the firmware setting. */
> -       caps->ctrl = (caps->ctrl & ~mask) | (caps->fw_ctrl & mask);
> -       caps->ctrl |= flags;
> +       caps->ctrl = (caps->ctrl & mask) | (caps->fw_ctrl & ~mask);
> +
> +       /* Apply the flags */
> +       caps->ctrl &= ~mask;
> +       caps->ctrl |= (flags & mask);

caps->ctrl = (caps->ctrl & mask) & ~mask == 0 - so this is kind of confusing.

What we want is to take the fw_ctl for all bits where mask is 0 and
take flags for all bits where it is 1?

  caps->ctrl = (caps->fw_ctrl & ~mask) | (flags & mask);

?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ