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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241213155450.00005b70@huawei.com>
Date: Fri, 13 Dec 2024 15:54:50 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC: <linux-pci@...r.kernel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, "Mahesh
 J Salgaonkar" <mahesh@...ux.ibm.com>, Oliver O'Halloran <oohall@...il.com>,
	Lukas Wunner <lukas@...ner.de>, Krzysztof Wilczyński
	<kw@...ux.com>, LKML <linux-kernel@...r.kernel.org>,
	<linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH v6 6/8] PCI: Add TLP Prefix reading into
 pcie_read_tlp_log()

On Thu, 12 Dec 2024 20:48:38 +0200 (EET)
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> wrote:

> On Thu, 12 Dec 2024, Ilpo Järvinen wrote:
> 
> > On Wed, 11 Dec 2024, Jonathan Cameron wrote:
> >   
> > > On Fri, 13 Sep 2024 17:36:30 +0300
> > > Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> wrote:
> > >   
> > > > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log
> > > > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present.
> > > > 
> > > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also
> > > > TLP Prefix Log. The relevant registers are formatted identically in AER
> > > > and DPC Capability, but has these variations:
> > > > 
> > > > a) The offsets of TLP Prefix Log registers vary.
> > > > b) DPC RP PIO TLP Prefix Log register can be < 4 DWORDs.
> > > > 
> > > > Therefore callers must pass the offset of the TLP Prefix Log register
> > > > and the entire length to pcie_read_tlp_log() to be able to read the
> > > > correct number of TLP Prefix DWORDs from the correct offset.
> > > > 
> > > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>  
> > > 
> > > Trivial comments below
> > > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> > > 
> > > Would have been nice if they'd just made the formats have the
> > > same sized holes etc!  
> > 
> > That's not even the worst problem.
> > 
> > They managed to copy-paste most of the stuff into DPC (copy-paste is 
> > really obvious because the text still refers to AER in a DPC section :-)) 
> > but forgot to add a few capability fields into the DPC capability, most 
> > importantly, the bit that indicates whether TLP was logged in Flit mode
> > or not And now we get to keep the pieces how to interpret the Log 
> > Registers (relates to the follow up series). :-(
> >   
> > > > diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c
> > > > index 65ac7b5d8a87..def9dd7b73e8 100644
> > > > --- a/drivers/pci/pcie/tlp.c
> > > > +++ b/drivers/pci/pcie/tlp.c
> > > > @@ -11,26 +11,65 @@  
> > >   
> > > >  /**
> > > >   * pcie_read_tlp_log - read TLP Header Log  
> > > Maybe update this to read TLP Header and Prefix Logs  
> > > >   * @dev: PCIe device
> > > >   * @where: PCI Config offset of TLP Header Log
> > > > + * @where2: PCI Config offset of TLP Prefix Log  
> > > 
> > > Is it worth giving it a more specific name than where2?
> > > Possibly renaming where as well!  
> > 
> > Sure, why not.  
> 
> Hi again,
> 
> After doing this rename, I rebased the Flit mode series on top of it and
> realized there's one small problem with naming where2. It will be 
> overloaded between TLP Prefix Log (Non-Flit mode) and extended TLP Header 
> Log (DW5+) (Flit mode) so I'm not sure if there's really going to be a 
> good name for it.
> 
Ah. I should read that series ;)

Absolutely fine - sometime generic naming is the best we can do!

Jonathan



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ