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: <20071027183130.0215e355@siona>
Date:	Sat, 27 Oct 2007 18:31:30 +0200
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	"Robert P. J. Day" <rpjday@...shcourse.ca>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: sg_next() for struct scatterlist is confusing

On Sat, 27 Oct 2007 07:39:40 -0400 (EDT)
"Robert P. J. Day" <rpjday@...shcourse.ca> wrote:

>   note how the comment says that the next entry will "usually" be
> sg+1, "but" not if it's actually a pointer.
> 
>   however, as i read the code above, sg is *always* incremented before
> that testing.  is that correct?  am i just misreading something?  or
> could the comment have been a bit clearer?

If it increments sg and finds a "chain" entry, it will follow it to the
next sg array instead of just returning it. Which makes sense because
the chain entry itself isn't a valid entry in the sg list.

HÃ¥vard
-
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