The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Benjamin Thery <benjamin.thery@bull.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Eric Biederman <ebiederm@xmission.com>,
	Serge Hallyn <serue@us.ibm.com>,
	linux-kernel@vger.kernel.org, Tejun Heo <htejun@gmail.com>,
	Al Viro <viro@ftp.linux.org.uk>,
	Daniel Lezcano <dlezcano@fr.ibm.com>
Subject: Re: [PATCH 09/10] netns: Enable tagging for net_class directories in sysfs
Date: Tue, 3 Jun 2008 09:35:15 -0700	[thread overview]
Message-ID: <20080603163514.GB544@suse.de> (raw)
In-Reply-To: <48456225.6070505@bull.net>

On Tue, Jun 03, 2008 at 05:24:21PM +0200, Benjamin Thery wrote:
> Greg KH wrote:
>> On Mon, Jun 02, 2008 at 03:46:08PM +0200, Benjamin Thery wrote:
>>> net: Enable tagging for net_class directories in sysfs
>>>
>>> The problem.  Network devices show up in sysfs and with the network
>>> namespace active multiple devices with the same name can show up in
>>> the same directory, ouch!
>>>
>>> To avoid that problem and allow existing applications in network 
>>> namespaces
>>> to see the same interface that is currently presented in sysfs, this
>>> patch enables the tagging directory support in sysfs.
>>>
>>> By using the network namespace pointers as tags to separate out the
>>> the sysfs directory entries we ensure that we don't have conflicts
>>> in the directories and applications only see a limited set of
>>> the network devices.
>> I don't like it how the network subsystem is starting to leach into the
>> sysfs core here.  What happens when the next subsystem wants to do the
>> same thing?  And then the next one?  Will they all have to do this kind
>> of intrusive changes to sysfs?
> >
> > Can't this be done only in the network subsystem?
>
> I'm not sure to understand exactly what you mean.
>
> What you don't like is seeing these hunks of network code in
> fs/sysfs/mount.c? And you prefer to see these bits of code resides in
> the network subsystem instead and see only "generic" sysfs services in
> fs/sysfs/mount.c?

Yes, exactly.

I don't want the problem that if more subsystems want to implement
something like this, they too need to modify the sysfs core.

And the mess with the #ifdef, that's not nice either :)

> If this is it, I have some idea to implement a less intrusive
> sysfs_net_exit(), which can be shared with the other namespaces.
> Serge introduces the same kind of changes in patch 10 to fix an issue in  
> user namespace. I think we can share a bit of code and move the parts
> specific to each namespace in their own subsystems.

I think that would be a good idea.  Care to redo the series?

thanks,

greg k-h

  reply	other threads:[~2008-06-03 16:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 13:44 [PATCH 00/10] sysfs tagged directories V4 Benjamin Thery
2008-06-02 13:44 ` [PATCH 01/10] sysfs: Support for preventing unmounts Benjamin Thery
2008-06-02 13:44 ` [PATCH 02/10] sysfs: sysfs_get_dentry add a sb parameter Benjamin Thery
2008-06-02 13:45 ` [PATCH 03/10] sysfs: Implement __sysfs_get_dentry Benjamin Thery
2008-06-02 13:45 ` [PATCH 04/10] sysfs: Rename Support multiple superblocks Benjamin Thery
2008-06-02 13:45 ` [PATCH 05/10] sysfs: sysfs_chmod_file handle " Benjamin Thery
2008-06-02 13:45 ` [PATCH 06/10] sysfs: Implement sysfs tagged directory support Benjamin Thery
2008-06-02 13:45 ` [PATCH 07/10] sysfs: Implement sysfs_delete_link and sysfs_rename_link Benjamin Thery
2008-06-02 13:45 ` [PATCH 08/10] driver core: Implement tagged directory support for device classes Benjamin Thery
2008-06-02 13:46 ` [PATCH 09/10] netns: Enable tagging for net_class directories in sysfs Benjamin Thery
2008-06-03  4:08   ` Greg KH
2008-06-03 12:16     ` Serge E. Hallyn
2008-06-03 15:24     ` Benjamin Thery
2008-06-03 16:35       ` Greg KH [this message]
2008-06-03 19:10         ` Benjamin Thery 
2008-06-02 13:46 ` [PATCH 10/10] sysfs: user namespaces: fix bug with clone(CLONE_NEWUSER) with fairsched Benjamin Thery
2008-06-02 19:24   ` Serge E. Hallyn
2008-06-02 21:17 ` [PATCH 00/10] sysfs tagged directories V4 Dan Smith

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=20080603163514.GB544@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=benjamin.thery@bull.net \
    --cc=dlezcano@fr.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serue@us.ibm.com \
    --cc=viro@ftp.linux.org.uk \
    /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