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:	Sun, 6 Mar 2011 16:29:44 +0900
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	maximlevitsky@...il.com
Cc:	akpm@...ux-foundation.org, James.Bottomley@...senPartnership.com,
	fujita.tomonori@....ntt.co.jp, linux-kernel@...r.kernel.org,
	oakad@...oo.com
Subject: Re: [PATCH 1/4] scatterlist: new helper functions

On Fri,  4 Mar 2011 06:16:50 +0200
Maxim Levitsky <maximlevitsky@...il.com> wrote:

> While developing memstick driver for legacy memsticks
> I found the need in few helpers that I think should be
> in common scatterlist library
> 
> The functions that were added:
> 
> * sg_nents/sg_total_len - iterate over scatterlist to figure
> out total length of memory it covers / number of entries.

You should invent a data structure per I/O request, something like
msb_request structure. Then you can store nents and total_len in
that.

That's what block subsystems and drivers do. I took a look at your
driver but I can't see why your driver can't do the same.
--
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