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: <20131031144710.05c08d4a3258098af9312781@linux-foundation.org>
Date:	Thu, 31 Oct 2013 14:47:10 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Ming Lei <ming.lei@...onical.com>
Cc:	linux-kernel@...r.kernel.org,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Tejun Heo <tj@...nel.org>, Jens Axboe <axboe@...nel.dk>,
	Matthew Dharm <mdharm-usb@...-eyed-alien.net>,
	Alan Stern <stern@...land.harvard.edu>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	USB list <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 1/2] lib/scatterlist: export sg_miter_skip()

On Wed, 30 Oct 2013 00:07:22 +0800 Ming Lei <ming.lei@...onical.com> wrote:

> sg_copy_buffer() can't meet demand for some drrivers(such usb
> mass storage), so we have to use the sg_miter_* APIs to access
> sg buffer, then need export sg_miter_skip() for these drivers.
> 
> The API is needed for converting to sg_miter_* APIs in USB storage
> driver for accessing sg buffer.
> 
> ...
>
> --- a/include/linux/scatterlist.h
> +++ b/include/linux/scatterlist.h
> @@ -345,6 +345,7 @@ struct sg_mapping_iter {
>  
>  void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
>  		    unsigned int nents, unsigned int flags);
> +bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset);
>  bool sg_miter_next(struct sg_mapping_iter *miter);
>  void sg_miter_stop(struct sg_mapping_iter *miter);
>  
> diff --git a/lib/scatterlist.c b/lib/scatterlist.c
> index d16fa29..3a8e8e8 100644
> --- a/lib/scatterlist.c
> +++ b/lib/scatterlist.c
> @@ -495,7 +495,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter)
>   *   true if @miter contains the valid mapping.  false if end of sg
>   *   list is reached.
>   */
> -static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
> +bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
>  {
>  	sg_miter_stop(miter);
>  
> @@ -513,6 +513,7 @@ static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
>  
>  	return true;
>  }
> +EXPORT_SYMBOL(sg_miter_skip);
>  
>  /**
>   * sg_miter_next - proceed mapping iterator to the next mapping

Looks OK to me.  Please include this in whatever tree is used to merge
"[PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer".

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ