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: <895b31de-f7f8-425c-870b-1524be21c688@amd.com>
Date: Thu, 1 Feb 2024 21:16:37 +1100
From: Alexey Kardashevskiy <aik@....com>
To: Lukas Wunner <lukas@...ner.de>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
 Bjorn Helgaas <bhelgaas@...gle.com>,
 Jonathan Cameron <jonathan.cameron@...wei.com>
Subject: Re: [PATCH kernel 1/4] pci/doe: Define protocol types and make those
 public

On 1/2/24 17:50, Lukas Wunner wrote:
> On Thu, Feb 01, 2024 at 05:02:25PM +1100, Alexey Kardashevskiy wrote:
>> Already public pci_doe() takes a protocol type argument.
>> PCIe 6.0 defines three, define them in a header for use with pci_doe().
> [...]
>> --- a/include/linux/pci-doe.h
>> +++ b/include/linux/pci-doe.h
>> @@ -13,6 +13,10 @@
>>   #ifndef LINUX_PCI_DOE_H
>>   #define LINUX_PCI_DOE_H
>>   
>> +#define PCI_DOE_PROTOCOL_DISCOVERY		0
>> +#define PCI_DOE_PROTOCOL_CMA_SPDM		1
>> +#define PCI_DOE_PROTOCOL_SECURED_CMA_SPDM	2
> 
> These are deliberately defined in the .c files which actually need them,
> i.e. DISCOVERY is defined in drivers/pci/doe.c and CMA_SPDM is defined in
> drivers/pci/cma.c:
> 
> https://lore.kernel.org/all/7721bfa3b4f8a99a111f7808ad8890c3c13df56d.1695921657.git.lukas@wunner.de/
> 
> I don't see why they would have to be public if they're each only needed
> in a single .c file.

SEV TIO needs both CMA and SECURED_CMA for DOE device<->firmware 
bouncing and it is going to use pci_doe() for this. I should have put 
this into the commit log, sorry about that.

Or the plan is to add pci_doe_secure_transport() to cma.c and force 
everyone use that?

The PCI SIG DOE protocol numbers (discovery, CMA, secure CMA) are all 
defined in one place in the PCIe spec and defining them in different 
places (doe.c, cma.c) is weird imho.


> 
> Thanks,
> 
> Lukas

-- 
Alexey


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ