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: Thu, 22 Feb 2024 16:08:11 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Vidya Sagar <vidyas@...dia.com>
Cc: bhelgaas@...gle.com, rafael@...nel.org, lenb@...nel.org,
	will@...nel.org, lpieralisi@...nel.org, kw@...ux.com,
	robh@...nel.org, frowand.list@...il.com, linux-pci@...r.kernel.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
	treding@...dia.com, jonathanh@...dia.com, kthota@...dia.com,
	mmaddireddy@...dia.com, sagar.tv@...il.com
Subject: Re: [PATCH V3] PCI: Add support for preserving boot configuration

On Fri, Feb 23, 2024 at 02:48:24AM +0530, Vidya Sagar wrote:
> On 22-02-2024 22:36, Bjorn Helgaas wrote:
> > On Thu, Feb 22, 2024 at 06:11:10PM +0530, Vidya Sagar wrote:

> > > +     if (&host_bridge->dev) {
> > Checking &host_bridge->dev doesn't seem like the right way to
> > determine whether this is an ACPI host bridge.

BTW, I think this condition is *always* true, since it's testing the
address of a member of a struct.

> Honestly, I couldn't find a clear way to differentiate between an
> ACPI based host bridge and a DT based host bridge. Hence, the
> current code tries to get the information using both ways and since
> a system can only be either ACPI or DT based, but one at a time,
> preserve_config will be set only once (assuming the system wants it
> to be set). Let me know if there is a better approach for this?

I'm not sure ACPI and DT will always be mutually exclusive; I think
we're headed toward some combinations, e.g.,
https://lore.kernel.org/linux-pci/1692120000-46900-1-git-send-email-lizhi.hou@amd.com/

But I think "if (ACPI_HANDLE(&host_bridge->dev))" would work.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ