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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yvtb93dhvhTS5xYB@kroah.com>
Date:   Tue, 16 Aug 2022 10:57:27 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Ray Chi <raychi@...gle.com>
Cc:     mathias.nyman@...el.com, stern@...land.harvard.edu,
        badhri@...gle.com, albertccwang@...gle.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] usb: xhci: add check_init_status hook support

On Tue, Aug 16, 2022 at 04:38:54PM +0800, Ray Chi wrote:
> In general, xHCI didn't do anything for port initialization. However,
> there are some requirement or limitation on various platforms, so
> vendors need to do some error handlings if the device connected to a
> broken USB accessory.
> 
> This patch also add the hook to xhci_driver_overrides so that vendors
> can add their specific protection easily if needed.
> 
> Signed-off-by: Ray Chi <raychi@...gle.com>
> ---
>  drivers/usb/host/xhci.c | 17 +++++++++++++++++
>  drivers/usb/host/xhci.h |  1 +
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 65858f607437..f237af9d6e2e 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -4358,6 +4358,20 @@ static int xhci_enable_device(struct usb_hcd *hcd, struct usb_device *udev)
>  	return xhci_setup_device(hcd, udev, SETUP_CONTEXT_ONLY);
>  }
>  
> +/*
> + * The function could get the status of port initialization.
> + */
> +static int xhci_check_init_status(struct usb_hcd *hcd, struct usb_device *udev, int r)
> +{
> +	/*
> +	 * In general, this function is not necessory. Some platforms may
> +	 * need doing error handling when the port initialization takes a
> +	 * long time to do. The device can use the override callback to
> +	 * do specific handlings.
> +	 */
> +	return 0;
> +}

For obvious technical and legal reasons, we are not allowed to add
"hooks" to the kernel where there are no in-kernel users.  Nor would you
want us to do so.

So I really do not understand this patch series at all.

What driver wants to do odd things here?  What needs to happen that the
in-tree drivers are not doing properly?  Why not get the needed fixes in
the in-kernel drivers instead of trying to add random hooks that some
out-of-tree code would use instead.

confused,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ