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] [day] [month] [year] [list]
Message-ID: <40c3d54b-677b-422d-b002-2155dc7ac66c@163.com>
Date: Wed, 12 Feb 2025 22:03:43 +0800
From: Hans Zhang <18255117159@....com>
To: Shradha Todi <shradha.t@...sung.com>, jingoohan1@...il.com
Cc: manivannan.sadhasivam@...aro.org, lpieralisi@...nel.org, kw@...ux.com,
 robh@...nel.org, bhelgaas@...gle.com, Frank.Li@....com,
 linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org, rockswang7@...il.com
Subject: Re: [v2] PCI: dwc: Add the debugfs property to provide the LTSSM
 status of the PCIe link



On 2025/2/12 19:39, Shradha Todi wrote:
>> @@ -463,6 +495,7 @@ struct dw_pcie {
>>   	struct reset_control_bulk_data	core_rsts[DW_PCIE_NUM_CORE_RSTS];
>>   	struct gpio_desc		*pe_rst;
>>   	bool			suspended;
>> +	struct dentry		*debugfs;
> 
> This pointer to main directory dentry is already present as rasdes_dir in struct dwc_pcie_rasdes_info.
> So struct dentry *debugfs is duplicating it.
> 
> We have a few options to solve this:
> 1. Remove struct dentry *rasdes_dir from dwc_pcie_rasdes_info and continue to have 2 pointers exposed
> in struct dw_pcie.
> 
> struct dwc_pcie_rasdes_info {
>          u32 ras_cap_offset;
>          struct mutex reg_lock;
> };
> struct dw_pcie {
>         .
>         .
>         struct dentry           *debugfs;
>          void                    *rasdes_info;
>   };
> 
> 2. Change rasdes_info to debugfs info:
> 
> struct dwc_pcie_rasdes_info {
>          u32 ras_cap_offset;
>          struct mutex reg_lock;
> };
> struct dwc_pcie_debugfs_info {
>          struct dwc_pcie_rasdes_info *rinfo;
>          struct dentry           *debugfs;
> };
> struct dw_pcie {
>         .
>         .
>          void                    *debugfs_info;
>   };
> 
> 3. Let ras related info get initialized to 0 even when rasdes cap is not present:
> 
> struct dwc_pcie_debugfs_info {
>          u32 ras_cap_offset;
>          struct mutex reg_lock;
>          struct dentry *debugfs;
> };
> struct dw_pcie {
>         .
>         .
>          void                    *debugfs_info;
>   };
> 
> I think option 2 would be the best, though it will need a bit of changes in my files. What do you suggest?
> 

I couldn't agree more. Can you build the debugfs framework? I or other 
developers can add some other debugfs nodes to this framework, not only 
dwc_pcie_rasdes_debugfs_init, but also dwc_pcie_debugfs_init.

I will add my patch with your next version. Please CC email me.

Best regards
Hans


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ