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:	Fri, 26 Oct 2007 10:03:18 +1000
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Jens Axboe <jens.axboe@...cle.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Boaz Harrosh <bharrosh@...asas.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	mingo@...e.hu
Subject: Re: [PATCH 09/10] Change table chaining layout

On Thursday 25 October 2007 21:54:44 Rusty Russell wrote:
> On Thursday 25 October 2007 19:11:40 Jens Axboe wrote:
> > On Thu, Oct 25 2007, Rusty Russell wrote:
> > > What irritates me more is that scatterlists aren't quite generically
> > > useful. The virtio code wants to join a scatterlist created by
> > > blk_rq_map_sg() with two others, yet it won't work because sg_chain()
> > > doesn't remove the end marker from the first entry.
> >
> > That's a minor nit for your special purpose, we/you can change that.
>
> Well currently sg_chain() only joins "incomplete" (ie. unterminated) sg
> chains.  That works great for you, but it feels more like a special purpose
> to me.
>
> > > If this patch weren't already included, I'd be strongly arguing for the
> > > bio idea: I find the chained sg code tricksy and ugly (sorry Jens).
> >
> > What is the bio idea? A bio works in essentially the same way, the only
> > difference is having a specific next pointer. It's still just a linked
> > lists of arbitrarily sized sg tables (the bio_vec arrays).
>
> It was suggested by analogy earlier in this thread, to use a two-level
> structure.
>
> In this case I would have first renamed struct scatterlist to struct
> scatterelem.  Then struct scatterlist looks like:
>
> 	struct scatterlist {
> 		unsigned int num;
> 		struct scatterelem elems[0];
> 	};

To correct my own thoughts, it'd be better to just put a "struct list_head 
list;" in there for chaining.  That's more along standard kernel lines, and 
neatly handles the single-scatterlist case.

Cheers,
Rusty.
-
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