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, 19 Jan 2016 16:52:25 +0800
From:	"liudongdong (C)" <liudongdong3@...wei.com>
To:	Tomasz Nowicki <tn@...ihalf.com>, Mark Salter <msalter@...hat.com>,
	<bhelgaas@...gle.com>, <arnd@...db.de>, <will.deacon@....com>,
	<catalin.marinas@....com>, <rjw@...ysocki.net>,
	<hanjun.guo@...aro.org>, <Lorenzo.Pieralisi@....com>,
	<okaya@...eaurora.org>, <jiang.liu@...ux.intel.com>,
	<Stefano.Stabellini@...citrix.com>
CC:	<robert.richter@...iumnetworks.com>, <mw@...ihalf.com>,
	<Liviu.Dudau@....com>, <ddaney@...iumnetworks.com>,
	<tglx@...utronix.de>, <wangyijing@...wei.com>,
	<Suravee.Suthikulpanit@....com>, <linux-pci@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linaro-acpi@...ts.linaro.org>, <jchandra@...adcom.com>,
	<jcm@...hat.com>, Zhou Wang <wangzhou1@...ilicon.com>,
	Gabriele Paoloni <gabriele.paoloni@...wei.com>
Subject: Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors
 against platfrom specific quirks.



在 2016/1/19 15:55, Tomasz Nowicki 写道:
> On 19.01.2016 02:49, liudongdong (C) wrote:
>> Hi Tomasz, Mark
>>
>> 在 2016/1/18 20:41, Tomasz Nowicki 写道:
>>> On 14.01.2016 16:36, Mark Salter wrote:
>>>>> +extern struct pci_mcfg_fixup __start_acpi_mcfg_fixups[];
>>>>> >+extern struct pci_mcfg_fixup __end_acpi_mcfg_fixups[];
>>>>> >+
>>>>> >+static struct pci_ops *pci_mcfg_check_quirks(struct acpi_pci_root
>>>>> *root)
>>>>> >+{
>>>>> >+    struct pci_mcfg_fixup *f;
>>>>> >+    int bus_num = root->secondary.start;
>>>>> >+    int domain = root->segment;
>>>>> >+
>>>>> >+    /*
>>>>> >+     * First match against PCI topology <domain:bus> then use DMI or
>>>>> >+     * custom match handler.
>>>>> >+     */
>>>>> >+    for (f = __start_acpi_mcfg_fixups; f < __end_acpi_mcfg_fixups;
>>>>> f++) {
>>>>> >+        if ((f->domain == domain || f->domain ==
>>>>> PCI_MCFG_DOMAIN_ANY) &&
>>>>> >+            (f->bus_num == bus_num || f->bus_num ==
>>>>> PCI_MCFG_BUS_ANY) &&
>>>>> >+            (f->system ? dmi_check_system(f->system) : 0 ||
>>>>> >+             f->match ? f->match(f, root) : 0))
>>>>> >+            return f->ops;
>>>> I think this would be better as:
>>>>
>>>>             (f->system ? dmi_check_system(f->system) : 1 &&
>>>>              f->match ? f->match(f, root) : 1))
>>>>             return f->ops;
>>>>
>>>> Otherwise, one has to call dmi_check_system() from f->match() if
>>>> access to root is needed.
>>>
>>
>> Non-DMI, we need not to call dmi_check_system() from f->match(),
>> we can use _HID to decide to hook the pci_ops or not.
>
> Sorry, but I dont understand your point. Can you elaborate?
>
> With Mark modification, you can use the following cases to identify platform:
> 1. DMI only
> 2. f->match() only (_HID can be used there)
> 3. DMI and f->match()
>
> DMI used to be very convenient way to recognise platform, sometimes it is not enough, hence f->match() alternative.
>

Yes, you are right,  I was wrong.
In my case, I can use the second point.
2. f->match() only (_HID can be used there)

Thanks
Dongdong

> Tomasz
>
>
>
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ