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]
Message-ID: <1abf8a09-4209-e000-f608-8664a4964670@huawei.com>
Date:   Sat, 17 Apr 2021 11:11:01 +0800
From:   liulongfang <liulongfang@...wei.com>
To:     Alan Stern <stern@...land.harvard.edu>
CC:     <gregkh@...uxfoundation.org>, <mathias.nyman@...el.com>,
        <liudongdong3@...wei.com>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kong.kongxinwei@...ilicon.com>,
        <yisen.zhuang@...wei.com>
Subject: Re: [RFC PATCH] USB:XHCI:skip hub registration

On 2021/4/16 23:20, Alan Stern wrote:
> On Fri, Apr 16, 2021 at 10:03:21AM +0800, liulongfang wrote:
>> On 2021/4/15 22:43, Alan Stern wrote:
>>> On Thu, Apr 15, 2021 at 08:22:38PM +0800, Longfang Liu wrote:
>>>> When the number of ports on the USB hub is 0, skip the registration
>>>> operation of the USB hub.
>>>>
>>>> The current Kunpeng930's XHCI hardware controller is defective. The number
>>>> of ports on its USB3.0 bus controller is 0, and the number of ports on
>>>> the USB2.0 bus controller is 1.
>>>>
>>>> In order to solve this problem that the USB3.0 controller does not have
>>>> a port which causes the registration of the hub to fail, this patch passes
>>>> the defect information by adding flags in the quirks of xhci and usb_hcd,
>>>> and finally skips the registration process of the hub directly according
>>>> to the results of these flags when the hub is initialized.
>>>>
>>>> Signed-off-by: Longfang Liu <liulongfang@...wei.com>
>>>
>>> The objections that Greg raised are all good ones.
>>>
>>> But even aside from them, this patch doesn't actually do what the 
>>> description says.  The patch doesn't remove the call to usb_add_hcd 
>>> for the USB-3 bus.  If you simply skipped that call (and the 
>>> corresponding call to usb_remove_hcd) when there are no 
>>> ports on the root hub, none of the stuff in this patch would be needed.
>>>
>>> Alan Stern
>>>
>>
>> "[RFC PATCH] USB:XHCI:Adjust the log level of hub"
> 
> I don't understand.  What patch is that?  Do you have a URL for it?
> 
URL: https://patchwork.kernel.org/project/linux-usb/patch/1616666652-37920-1-git-send-email-liulongfang@huawei.com/
Thanks
Longfang.

>> The current method is an improved method of the above patch.
>> This patch just make it skip registering USB-3 root hub if that hub has no ports,
> 
> No, that isn't what this patch does.
> 
> If the root hub wasn't registered, hub_probe wouldn't get called.  But 
> with your patch, the system tries to register the root hub, and it does 
> call hub_probe, and then that function fails with a warning message.
> 
> The way to _really_ akip registering the root hub is to change the 
> xhci-hcd code.  Make it skip calling usb_add_hcd.
> 
>> after skipping registering, no port will not report error log,the goal of this
>> patch is reached without error log output.
> 
> Why do you want to get rid of the error log output?  There really _is_ 
> an error, because the USB-3 hardware on your controller is defective.  
> Since the hardware is buggy, we _should_ print an error message in the 
> kernel log.
> 
> Alan Stern
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ