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:   Tue, 22 Sep 2020 09:05:06 -0400
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     peterz@...radead.org, mingo@...hat.com,
        linux-kernel@...r.kernel.org, bhelgaas@...gle.com,
        eranian@...gle.com, ak@...ux.intel.com
Subject: Re: [RESEND PATCH V2 5/6] perf/x86/intel/uncore: Generic support for
 the PCI sub driver



On 9/21/2020 6:19 PM, Bjorn Helgaas wrote:
> On Mon, Sep 14, 2020 at 07:34:19AM -0700, kan.liang@...ux.intel.com wrote:
>> From: Kan Liang <kan.liang@...ux.intel.com>
>>
>> Some uncore counters may be located in the configuration space of a PCI
>> device, which already has a bonded driver. Currently, the uncore driver
>> cannot register a PCI uncore PMU for these counters, because, to
>> register a PCI uncore PMU, the uncore driver must be bond to the device.
>> However, one device can only have one bonded driver.
>>
>> Add an uncore PCI sub driver to support such kind of devices.
>>
>> The sub driver doesn't own the device. In initialization, the sub
>> driver searches the device via pci_get_device(), and register the
>> corresponding PMU for the device. In the meantime, the sub driver
>> registeris a PCI bus notifier, which is used to notify the sub driver
>> once the device is removed. The sub driver can unregister the PMU
>> accordingly.
> 
> s/registeris/registers/
> 
> It looks like this only handles hot-remove of the device, not hot-add.
> Maybe that's OK for your use case, I dunno, so just pointing it out.
> 

Hi Bjorn,

Thanks for the review.

Yes, the patch only supports the hot-remove for now, because
- I didn't get any requests for the hot-add support. I doubt anyone 
hot-adds a Root Port device in practice.
- To be honest, I don't have a test case to verify the hot-add of a Root 
Port device.
   I used the command line below to test the hot-remove.
   sudo bash -c 'echo 1 > /sys/bus/pci/devices/0000\:14\:04.0/remove'
   Then the device is gone. I have no idea how to add it back.

So I only implemented the hot-remove in this patch. If anyone requires 
the hot-add, I can add it later separately.

Thanks,
Kan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ