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, 4 Apr 2024 11:40:37 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>,
 Krzysztof WilczyƄski <kw@...ux.com>,
 Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Kishon Vijay Abraham I <kishon@...nel.org>,
 Thierry Reding <thierry.reding@...il.com>,
 Jonathan Hunter <jonathanh@...dia.com>, Jingoo Han <jingoohan1@...il.com>,
 linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
 linux-kernel@...r.kernel.org, mhi@...ts.linux.dev,
 linux-tegra@...r.kernel.org, Niklas Cassel <cassel@...nel.org>
Subject: Re: [PATCH v2 02/10] PCI: endpoint: Decouple EPC and PCIe bus
 specific events

On 4/3/24 23:26, Manivannan Sadhasivam wrote:
> On Tue, Apr 02, 2024 at 09:14:20AM +0900, Damien Le Moal wrote:
>> On 4/2/24 00:50, Manivannan Sadhasivam wrote:
>>> Currently, 'struct pci_epc_event_ops' has a bunch of events that are sent
>>> from the EPC driver to EPF driver. But those events are a mix of EPC
>>> specific events like core_init and PCIe bus specific events like LINK_UP,
>>> LINK_DOWN, BME etc...
>>>
>>> Let's decouple them to respective structs (pci_epc_event_ops,
>>> pci_epc_bus_event_ops) to make the separation clear.
>>
>> I fail to see the benefits here. The event operation names are quite clear and,
>> in my opinion, it is clear if an event op applies to the controller or to the
>> bus/link. If anything, "core_init" could a little more clear, so renaming that
>> "ep_controller_init" or something like that (clearly spelling out what is being
>> initialized) seems enough to me. Similarly, the "bme" op name is very criptic.
>> Renaming that to "bus_master_enable" would go a long way clarifying the code.
>> For link events, "link_up", "link_down" are clear. So I think there is no need
>> to split the event op struct like this. Renaming the ops is better.
>>
>> Note that I am not opposed to this patch, but I think it is just code churn
>> that does not really bring any fundamental improvement. Regardless, renaming
>> "core_init" and "bme" ops is I think desired.
>>
> 
> Niklas shared the same view during v1, but I hate to see the events being mixed
> in a single ops. Especially that it will confuse the developers who are not
> familiar with the EP subsystem.
> 
> But since the argument is coming twice, I've decided to drop this for now and
> just rename the 'core_init' callback to 'epc_init' and name the deinit callback
> as 'epc_deinit'.

Sounds good. Please also rename the completely unclear "bme" operation. Spell it
out to be clear.

-- 
Damien Le Moal
Western Digital Research


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ