public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@istop.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Greg KH <greg@kroah.com>, Joel Becker <Joel.Becker@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Permissions don't stick on ConfigFS attributes
Date: Mon, 22 Aug 2005 15:44:07 -0400	[thread overview]
Message-ID: <200508221544.07223.phillips@istop.com> (raw)
In-Reply-To: <m18xyuvanj.fsf@ebiederm.dsl.xmission.com>

On Monday 22 August 2005 00:49, Eric W. Biederman wrote:
> I am confused.  I am beginning to see shades of the devfs problems coming
> up again.  sysfs is built to be world readable by everyone who has it
> mounted in their namespace.  Writable files in sysfs I have never
> understood.

Sysfs is not like devfs by nature, it is more like procfs.  It exposes 
properties of a device, not the device itself.  It makes perfect sense that 
some of the properties should be writeable.

> Given that we now have files which do not conform to one uniform
> policy for everyone is there any reason why we do not want to allocate
> a character device major number for all config values and dynamically
> allocate a minor number for each config value?  Giving each config
> value its own unique entry under /dev.

/dev is already busy enough without adding masses of entries that are not 
devices.  I don't see that this would simplify the internal implementation 
either, the opposite actually.  The user certainly will not have any use for 
temporary device numbers in this context.

On the other hand, it is clunky to force an application to go through the same 
parse/format interface as the user just to get/set a simple integer.  Perhaps 
sysfs needs to be taught how to ioctl these properties.  I see exposing 
property names and operating on them as orthogonal issues that are currently 
joined at the hip in an unnatural, but fixable way.

> Device nodes for each writable config value trivially handles
> persistence and user policy and should be easy to implement in the
> kernel.  We already have a policy engine in userspace, udev to handle
> all of the chaos.
>
> Why do we need another mechanism?

We need the mechanism that exposes subsystem instance properties as they 
appear and disappear with changing configuration.  This is a new mechanism 
anyway, so implementing it using device nodes does not save anything, it only 
introduces a new requirement to allocate device numbers.

> Are device nodes out of fashion these days?

They are, at least for putting things in /dev that are not actual hardware.

Regards,

Daniel

      reply	other threads:[~2005-08-22 19:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-20  0:50 [PATCH] Permissions don't stick on ConfigFS attributes Daniel Phillips
2005-08-20  1:22 ` Jon Smirl
2005-08-20  6:21   ` Daniel Phillips
2005-08-20  3:01 ` Greg KH
2005-08-20  3:23   ` Daniel Phillips
2005-08-20  3:33     ` Greg KH
2005-08-20  5:41       ` Daniel Phillips
2005-08-20  6:31   ` Joel Becker
2005-08-20  7:35     ` Daniel Phillips
2005-08-20 21:09   ` [PATCH] Permissions don't stick on ConfigFS attributes (revised) Daniel Phillips
2005-08-22  4:49   ` [PATCH] Permissions don't stick on ConfigFS attributes Eric W. Biederman
2005-08-22 19:44     ` Daniel Phillips [this message]

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=200508221544.07223.phillips@istop.com \
    --to=phillips@istop.com \
    --cc=Joel.Becker@oracle.com \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@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