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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45CBC24D.9040408@miyazawa.org>
Date:	Fri, 09 Feb 2007 09:37:33 +0900
From:	Kazunori MIYAZAWA <kazunori@...azawa.org>
To:	Patrick McHardy <kaber@...sh.net>
CC:	Herbert Xu <herbert@...dor.apana.org.au>,
	David Miller <davem@...emloft.net>, Miika Komu <miika@....fi>,
	Diego Beltrami <Diego.Beltrami@...t.fi>,
	netdev@...r.kernel.org, usagi-core@...ux-ipv6.org
Subject: Re: [PATCH][IPSEC][4/6] changing "ipip tunnel" and xfrm4_tunnel to
 the API change

Thank you Patrick for your review.
I'll fix and send again.

BTW, I'm going to use separete xfrm_tunnel_handler to solve
the issue which you pointed at the moment. But why does
"register twice" corrupt the list even if I use separate lists
for the address family.

Thank you,

Patrick McHardy wrote:
> Kazunori MIYAZAWA wrote:
>> Changing ipip tunnel and xfrm4_tunnel to the API
> 
> Fixing up users after API changes should be done in the same
> patch as the API change itself to avoid breaking compilation
> for people doing a bisection.
> 
>> index f110af5..00fc09f 100644
>> --- a/net/ipv4/xfrm4_tunnel.c
>> +++ b/net/ipv4/xfrm4_tunnel.c
>> @@ -66,12 +66,15 @@ static struct xfrm_tunnel xfrm_tunnel_ha
>>  
>>  static int __init ipip_init(void)
>>  {
>> -	if (xfrm_register_type(&ipip_type, AF_INET) < 0) {
>> -		printk(KERN_INFO "ipip init: can't add xfrm type\n");
>> +	if (xfrm_register_type(&ipip_type, AF_INET) < 0)
>> +		return -EAGAIN;
> 
> Why are you removing the printk?
> 
>> +
>> +	if (xfrm4_tunnel_register(&xfrm_tunnel_handler, AF_INET)) {
>> +		printk(KERN_INFO "ipip init: can't add xfrm handler for AF_INET\n");
>>  		return -EAGAIN;
> 
> Does not unregister ipip_type on error.
> 
>>  	}
>> -	if (xfrm4_tunnel_register(&xfrm_tunnel_handler)) {
>> -		printk(KERN_INFO "ipip init: can't add xfrm handler\n");
>> +	if (xfrm4_tunnel_register(&xfrm_tunnel_handler, AF_INET6)) {
> 
> You register xfrm_tunnel_handler twice, which will corrupt the list.
> 
>> +		printk(KERN_INFO "ipip init: can't add xfrm handler for AF_INET6\n");
>>  		xfrm_unregister_type(&ipip_type, AF_INET);
> 
> Does not unregister AF_INET tunnel handler on error.
> 
>>  		return -EAGAIN;
>>  	}
> 
> The next patch has similar problems.
> -
> 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

--
Kazunori Miyazawa
-
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