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, 20 Oct 2020 07:13:31 -0700
From:   Tom Rix <trix@...hat.com>
To:     Xu Yilun <yilun.xu@...el.com>
Cc:     mdf@...nel.org, linux-fpga@...r.kernel.org,
        linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        lgoncalv@...hat.com, hao.wu@...el.com
Subject: Re: [PATCH 1/2] fpga: dfl: add driver_override support


On 10/20/20 12:11 AM, Xu Yilun wrote:
>>>>>  int __dfl_driver_register(struct dfl_driver *dfl_drv, struct module *owner)
>>>>>  {
>>>>> -	if (!dfl_drv || !dfl_drv->probe || !dfl_drv->id_table)
>>>>> +	if (!dfl_drv || !dfl_drv->probe)
>>>> id_table is still needed for the normal case.
>>>>
>>>> Instead of removing this check, could you add something like
>>>>
>>>> || (!dfl_drv->is_override && !dfl_drv->id_table)
>>> I don't think it is needed. Seems is_override and !id_table are duplicated
>>> conditions for this implementation. And it may make confusing, e.g. could
>>> a driver been force matched when is_override is not set?
>>>
>>> I think we could make it simple, if the dfl driver didn't provide the
>>> id_table, normally it could not match any device. I think it could be
>>> easily understood by dfl driver developers.
>>>
>> Then an ASSERT should be added in dfl_bus_match() for id_entry.
> I didn't get your idea. What Assertion should be added for id_entry?
> BUG_ON(id_entry == NULL)? Then dfl-uio-pdev can't be inserted before
> driver_override is set.
>
> I think it is normal case that a driver is successfully registered but
> doesn't match any device because it provides no id_table.

Ok, i see your point.

Thanks for the explanation.

Tom


>
> Thanks,
> Yilun.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ