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] [day] [month] [year] [list]
Message-ID: <73356479-e037-4727-9444-6ad4c89f6b75@rowland.harvard.edu>
Date:   Tue, 31 Oct 2023 10:27:23 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Manan Aurora <maurora@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Badhri Jagan Sridharan <badhri@...gle.com>,
        Francesco Dolcini <francesco.dolcini@...adex.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        manugautam@...gle.com
Subject: Re: [PATCH] usb: gadget: Support transfers from device memory

On Tue, Oct 31, 2023 at 03:54:02AM +0000, Manan Aurora wrote:
> USB gadget stack only supports usb_request objects that point to buffers
> located in memory. Support use cases where data is transferred from
> physical addresses in device mmio regions
> 
> Added a bit "pre_mapped" to usb_request to bypass dma_map_single and
> dma_map_sg for such requests
> 
> The caller must determine the dma address for the request before queuing
> it
> 
> Signed-off-by: Manan Aurora <maurora@...gle.com>
> ---

> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index a771ccc038ac..6bc035439098 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -111,6 +111,7 @@ struct usb_request {
>  	unsigned		zero:1;
>  	unsigned		short_not_ok:1;
>  	unsigned		dma_mapped:1;
> +	unsigned		pre_mapped:1;
>  
>  	void			(*complete)(struct usb_ep *ep,
>  					struct usb_request *req);

You forgot to update the kerneldoc for struct usb_request.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ