From: Jay Vosburgh <fubar@us.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] bonding: debugfs and network namespaces are incompatible
Date: Tue, 10 Jul 2012 12:13:01 -0700 [thread overview]
Message-ID: <16903.1341947581@death.nxdomain> (raw)
In-Reply-To: <367b470c-c3f5-4555-be11-02223125b741@email.android.com>
[ adding netdev back to cc: ]
Eric W. Biederman <ebiederm@xmission.com> wrote:
>Jay Vosburgh <fubar@us.ibm.com> wrote:
>
>>David Miller <davem@davemloft.net> wrote:
>>
>>>From: ebiederm@xmission.com (Eric W. Biederman)
>>>Date: Mon, 09 Jul 2012 13:52:43 -0700
>>>
>>>>
>>>> The bonding debugfs support has been broken in the presence of
>>network
>>>> namespaces since it has been added. The debugfs support does not
>>handle
>>>> multiple bonding devices with the same name in different network
>>>> namespaces.
>>>>
>>>> I haven't had any bug reports, and I'm not interested in getting
>>any.
>>>> Disable the debugfs support when network namespaces are enabled.
>>>>
>>>> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>>>
>>>Applied.
>>
>> Since distro kernels appear to set CONFIG_NET_NS, doesn't this
>>effectively disable debugfs for bonding on most distros?
>
>Yes.
>
>> Do the other network device drivers that support debugfs have a
>>similar problem? E.g., if each of two namespaces have an skge device
>>with the same name, will there be a debugfs conflict there as well?
>
>I haven't run across any of those network devices, but if they create a
>debugfs entry that embeds the device name it will be a problem.
A quick grep suggests that cxgb4, skge, sky2, stmmac, ipoib and
half a dozen of the wireless drivers all create files in debugfs. I did
not check exhaustively, but at least some of them include the device
name.
>Last I looked any custom user space interface from network devices was
>rare and bonding using debugfs is the first instance of using debugfs
>from networking devices I have seen.
>
>I think the problem will be a little less severe for physical network
>devices as they all start in the initial network namespace and so start
>with distinct names.
>
>With bonding I can do "ip link add type bond" in any network namespace
>and get another bond0. So name conflicts are very much expeted with all
>virtual networking devices.
Fair enough, although it is trivial to rename any network device
such that a conflict would occur.
It looks like some of the drivers use fixed names for some
things as well.
>But if you know of any other networking devices using debugsfs that
>code should probably get the same treatment as the bonding debugfs code.
Is there no alternative than simply disabling debugfs whenever
network namespaces are enabled? The information bonding displays via
debugfs is useful, and having it unavailable on all distro kernels seems
a bit harsh.
Why is the logic already in the driver not sufficient? If the
attempt to create the debugfs directory with the interface name fails,
then it merely prints a warning and continues without the debugfs for
that interface.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
next prev parent reply other threads:[~2012-07-10 19:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1340900320.3441.88.camel@pro6455b.example.com>
[not found] ` <20120705220749.GA11255@mail.hallyn.com>
2012-07-06 0:41 ` Network namespace and bonding WARNING at fs/proc/generic.c remove_proc_entry Eric W. Biederman
[not found] ` <87ehopu3e5.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-06 17:05 ` Serge E. Hallyn
[not found] ` <20120706170538.GA31679-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-07-06 18:01 ` Dilip Daya
2012-07-06 18:57 ` Eric W. Biederman
[not found] ` <87fw94g1kq.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-06 19:47 ` Serge E. Hallyn
[not found] ` <20120706194741.GA22113-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-07-09 20:51 ` [PATCH 1/2] bonding: Manage /proc/net/bonding/ entries from the netdev events Eric W. Biederman
[not found] ` <87y5ms3bfi.fsf_-_-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-09 20:52 ` [PATCH 2/2] bonding: debugfs and network namespaces are incompatible Eric W. Biederman
[not found] ` <87sjd03bdw.fsf_-_-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-07-09 21:49 ` David Miller
2012-07-10 17:36 ` Jay Vosburgh
[not found] ` <367b470c-c3f5-4555-be11-02223125b741@email.android.com>
2012-07-10 19:13 ` Jay Vosburgh [this message]
2012-07-12 0:18 ` Eric W. Biederman
2012-07-12 1:57 ` Jay Vosburgh
2012-07-09 21:49 ` [PATCH 1/2] bonding: Manage /proc/net/bonding/ entries from the netdev events David Miller
2012-07-06 18:01 ` Network namespace and bonding WARNING at fs/proc/generic.c remove_proc_entry Dilip Daya
2012-07-06 18:40 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16903.1341947581@death.nxdomain \
--to=fubar@us.ibm.com \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).