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: <4574251C.8000906@trash.net>
Date:	Mon, 04 Dec 2006 14:39:40 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	hadi@...erus.ca
CC:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [XFRM] Optimize SA dumping

jamal wrote:
> On Mon, 2006-04-12 at 13:36 +0100, Patrick McHardy wrote:
> 
>>jamal wrote:
>>
>>> 	for (i = 0; i <= xfrm_state_hmask; i++) {
>>> 		hlist_for_each_entry(x, entry, xfrm_state_bydst+i, bydst) {
>>>+			if (count && send_x != last_x) {
>>>+				err = func(send_x, count, data);
>>>+				if (err)
>>>+					goto out;
>>>+				send_x = NULL;
>>>+			}
>>> 			if (!xfrm_id_proto_match(x->id.proto, proto))
>>> 				continue;
>>
>>After you sent send_x and set it to NULL, it will be different from
>>last_x (since that is != NULL) and the NULL pointer will be given
>>to func() when continuing here.
>>
> 
> 
> This one you lost me. Can you give me an example? one or two SAs found?

More than three SAs, so we have:

send_x = last_x = NULL

1. iteration:

send_x = last_x = first policy

2. iteration:

send_x = first policy
last_x = second policy

3. iteration:

dump send_x, set send_x = NULL
continue at continue statement

4. iteration:

We have send_x = NULL and last_x != NULL, so send_x != last_x,
leading to dump(NULL, ...)

> In any case, if i go the done callback approach, I can get rid of all
> this tracking thing ...

I need to read your other mail first before commenting on this :)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ