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: <3cbd6ddb-1984-4055-9d29-297b4633fc41@kernel.org>
Date: Wed, 25 Sep 2024 07:29:59 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Vidya Sagar <vidyas@...dia.com>, corbet@....net, bhelgaas@...gle.com,
 galshalom@...dia.com, leonro@...dia.com, jgg@...dia.com, treding@...dia.com,
 jonathanh@...dia.com
Cc: mmoshrefjava@...dia.com, shahafs@...dia.com, vsethi@...dia.com,
 sdonthineni@...dia.com, jan@...dia.com, tdave@...dia.com,
 linux-doc@...r.kernel.org, linux-pci@...r.kernel.org,
 linux-kernel@...r.kernel.org, kthota@...dia.com, mmaddireddy@...dia.com,
 sagar.tv@...il.com, vliaskovitis@...e.com
Subject: Re: [PATCH V4] PCI: Extend ACS configurability

On 25. 09. 24, 7:06, Jiri Slaby wrote:
>> @@ -1047,23 +1066,33 @@ static void pci_std_enable_acs(struct pci_dev 
>> *dev)
>>    */
>>   static void pci_enable_acs(struct pci_dev *dev)
>>   {
>> -    if (!pci_acs_enable)
>> -        goto disable_acs_redir;
>> +    struct pci_acs caps;
>> +    int pos;
>> +
>> +    pos = dev->acs_cap;
>> +    if (!pos)
>> +        return;
>> -    if (!pci_dev_specific_enable_acs(dev))
>> -        goto disable_acs_redir;
>> +    pci_read_config_word(dev, pos + PCI_ACS_CAP, &caps.cap);
>> +    pci_read_config_word(dev, pos + PCI_ACS_CTRL, &caps.ctrl);
>> +    caps.fw_ctrl = caps.ctrl;
>> -    pci_std_enable_acs(dev);
>> +    /* If an iommu is present we start with kernel default caps */
>> +    if (pci_acs_enable) {

AFAIU pci_acs_enable is set from iommus' code via pci_request_acs(). 
Which is much later than when bridges are initialized here, right?

>> +        if (pci_dev_specific_enable_acs(dev))
>> +            pci_std_enable_acs(dev, &caps);

So this is never called, IMO.

>> +    }

thanks,
-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ