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: <4991B5C9.9040005@free.fr>
Date:	Tue, 10 Feb 2009 18:13:45 +0100
From:	Daniel Lezcano <daniel.lezcano@...e.fr>
To:	nicolas.dichtel@....6wind.com
CC:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	containers@...ts.osdl.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH] netns: remove useless synchronize_net()

Nicolas Dichtel wrote:
> Le 10.02.2009 17:40, Daniel Lezcano a écrit :
>> Nicolas Dichtel wrote:
>>> Le 06.02.2009 23:10, David Miller a écrit :
>>>> From: Nicolas Dichtel <nicolas.dichtel@....6wind.com>
>>>> Date: Fri, 06 Feb 2009 14:50:53 +0100
>>>>
>>>>> If namespace is destroyed after this function, then cleanup_net()
>>>>> will ensure that nobody is looking at it
>>>>
>>>> Maybe, but you better get some opinions from the people who wrote
>>>> and maintain the network namespace code before I can consider
>>>> your change seriously.
>>>>
>>>> None of them responded to your patch posting, probably because
>>>> you failed to CC: any of them.
>>> Sorry, I forget to cc them, now it's done.
>>> The thread can be found here: 
>>> http://marc.info/?l=linux-netdev&m=123382930115535&w=2
>>>
>>> So, I'm waiting for maintainers's opinions.
>> We can move one network device from one namespace to another 
>> namespace, and that do not necessarily implies the network namespace 
>> will die and call cleanup_net.
>> Without synchronize_net, it would be possible to have 
>> netif_receive_skb and dev_change_net_namespace to be executed 
>> concurrently, no ?
>> Wouldn't the execution of one of this function be problematic if we 
>> are in the delivery of a packet to the upper protocol in the big 
>> rcu_read_lock section of netif_receive_skb ?
> Just to be sure: there is two synchronize_net() in 
> dev_change_net_namespace(), and I was talking about the second one. 
> The second one is called just before exiting the function.
>
>
> Regards,
> Nicolas

Ah, ok :)

Hmm, at the first glance I would say it is useless but perhaps there is 
a trick here I do not understand.
Eric, is there any particular reason to call synchronize_net before 
exiting the dev_change_net_namespace function ?


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