public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: Greg KH <greg@kroah.com>, Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] Add kernel<->userspace ABI stability documentation
Date: Mon, 27 Feb 2006 11:44:00 -0800	[thread overview]
Message-ID: <20060227194400.GB9991@suse.de> (raw)
In-Reply-To: <p7364n01tv3.fsf@verdi.suse.de>

On Mon, Feb 27, 2006 at 08:31:28PM +0100, Andi Kleen wrote:
> Greg KH <greg@kroah.com> writes:
> 
> > Hi all,
> > 
> > As has been noticed recently by a lot of different people, it seems like
> > we are breaking the userspace<->kernelspace interface a lot.  Well, in
> > looking back over time, we always have been doing this, but no one seems
> > to notice (proc files changing format and location, netlink library
> > bindings, etc.)
> 
> Ok, but how do you plan to address the basic practical problem?
> People cannot freely upgrade/downgrade kernels anymore since udev/hal
> are used widely in distributions.

I can freely upgrade/downgrade kernels on some distros[1] if I wish to,
as they support such things.  Just complain to your distro maker if you
have this issue :)

I'm worrying about documenting this stuff, and allowing a way for kernel
people to work with the userspace people that use these interfaces to
hopefully not break things in ways that are unexpected, and/or break
things at all.

> Does it imply you plan to change udev/hal to only use stable interfaces
> for now? I would applaud such a move, but I guess it would come
> at the cost of functionality.

It all depends on the type of interface, sysfs is still shaking itself
out as more and more people use it.  udev today can work with the
changes we have in store for sysfs in the future (see Kay's old patches
on lkml for the kernel for examples of where we are going), so udev
looks to work just fine.  But we want to know what other programs uses
these interfaces so they too can be prepared in case things happen.

And remember, HAL is there to handle all of the crap and flux in the
kernel api and hide it from all other userspace programs.  It is _much_
easier to work with one program to ensure that we don't break things and
test stuff out to see how they will work better, than have to run around
all of Gnome and KDE to touch up all of the different programs.  But
that's a topic that has nothing to do with this thread, sorry.

> If these applications are not changed then the documentation is likely
> useless because it won't help anyways - things will still break,
> kernel hackers and users will curse you all the time when they want to
> test kernels etc.

That's what the "Users:" lines are for, so that we can all work together
as one big happy team :)

> > --- /dev/null
> > +++ gregkh-2.6/Documentation/ABI/stable/syscalls
> > @@ -0,0 +1,10 @@
> > +What:		The kernel syscall interface
> > +Description:
> > +	This interface matches much of the POSIX interface and is based
> > +	on it and other Unix based interfaces.  It will only be added to
> > +	over time, and not have things removed from it.
> 
> Some ioctls and socket options unfortunately don't follow this. I
> guess you will need to document them separately.

Agreed.

> Could be ugly to have hundreds of files for ioctls though.
> Perhaps define core ioctls and then driver ioctls and define
> all the driver ioctls unstable by default? But that also
> would just mean the category stable would be useless
> because people always would need to use unstable interfaces
> too.

No, not many programs use ioctls.  And a lot of them are stable and have
not changed in years (tty, block, etc.) and should be explicitly
documented here.

These examples were just examples of things that go into the different
directories.  There is a lot more work ahead to document everything that
is currently implemented.

> > --- /dev/null
> > +++ gregkh-2.6/Documentation/ABI/testing/sysfs-class
> > @@ -0,0 +1,16 @@
> > +What:		/sys/class/
> > +Date:		Febuary 2006
> > +Contact:	Greg Kroah-Hartman <gregkh@suse.de>
> > +Description:
> > +		The /sys/class directory will consist of a group of
> > +		subdirectories describing individual classes of devices
> > +		in the kernel.  The individual directories will consist
> > +		of either subdirectories, or symlinks to other
> > +		directories.
> > +
> > +		All programs that use this directory tree must be able
> > +		to handle both subdirectories or symlinks in order to
> > +		work properly.
> 
> What good is it if you don't say anything about the stability of its contents?
> Looks far too vague to me.

The "contents" are merely symlinks back to the device (well, some are
symlinks, others are directories, in the end all will be symlinks.)

And yes, the individual classes need to also be documented to be
through, again, this was a first cut to provide examples, not to be
complete.  Patches are welcome to help flush it all out.

thanks,

greg k-h


[1] Gentoo for example works almost just fine[2] with udev with kernels
ranging from 2.6.9 to 2.6.16-rc4, I haven't tried older kernels than
that in a long time.

[2] cdrom symlinks don't get created on older kernels due to IDE
changes, but a simple rule change handles that, and could be added to
the main install if it becomes annoying.


  reply	other threads:[~2006-02-27 19:44 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 19:01 [RFC] Add kernel<->userspace ABI stability documentation Greg KH
2006-02-27 19:08 ` Arjan van de Ven
2006-02-27 19:11   ` Greg KH
2006-02-27 19:17     ` Arjan van de Ven
2006-02-27 19:22 ` Kumar Gala
2006-02-27 19:30   ` Greg KH
2006-02-27 19:31 ` Andi Kleen
2006-02-27 19:44   ` Greg KH [this message]
2006-03-01 13:53     ` Lars Marowsky-Bree
2006-03-01 14:10       ` Gabor Gombas
2006-03-01 14:35         ` Jes Sorensen
2006-03-01 16:30         ` Lars Marowsky-Bree
2006-02-27 20:06   ` Jesper Juhl
2006-02-27 19:35 ` Diego Calleja
2006-02-27 19:49   ` Greg KH
2006-02-27 19:57     ` Diego Calleja
2006-02-27 20:00       ` Greg KH
2006-02-27 20:13         ` Diego Calleja
2006-02-28  0:26           ` Greg KH
2006-02-27 19:36 ` Benjamin LaHaise
2006-02-27 19:46   ` Greg KH
2006-02-27 20:01     ` Benjamin LaHaise
2006-02-27 20:13       ` Greg KH
2006-02-27 20:22         ` John W. Linville
2006-02-27 22:00           ` Greg KH
2006-02-27 20:10     ` Arjan van de Ven
2006-02-27 22:58       ` Olivier Galibert
2006-02-27 20:20     ` Linus Torvalds
2006-02-27 21:04       ` Al Viro
2006-02-27 23:33         ` Nicholas Miell
2006-02-27 23:45       ` Greg KH
2006-02-28  1:52         ` Jason Lunz
2006-02-28  6:32         ` Theodore Ts'o
2006-02-28  6:41           ` Dave Jones
2006-03-01  0:34           ` Greg KH
2006-03-01  1:17             ` Nicholas Miell
2006-03-02  4:24               ` Greg KH
2006-03-05 16:17                 ` Eric W. Biederman
2006-03-05 23:23                   ` Benjamin LaHaise
2006-03-06  0:12                     ` Eric W. Biederman
2006-03-06  0:39                       ` Benjamin LaHaise
2006-03-06  2:15                         ` Eric W. Biederman
2006-03-07  3:56                           ` Greg KH
2006-02-27 19:52 ` Alistair John Strachan
2006-02-27 19:57   ` Greg KH
2006-02-27 20:05     ` Alistair John Strachan
2006-02-27 20:12       ` Greg KH
2006-02-27 20:15         ` Greg KH
2006-02-27 22:56           ` Olivier Galibert
2006-02-28  0:11             ` Greg KH
2006-02-27 20:01 ` Jesper Juhl
2006-03-01  0:21   ` Greg KH
2006-02-28 11:39 ` Nikita Danilov
2006-03-01  0:23   ` Greg KH
2006-03-01  7:27     ` Arjan van de Ven
2006-03-01 20:56       ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2006-03-07 14:44 Al Boldi
2006-03-07 15:21 ` Josh Boyer

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=20060227194400.GB9991@suse.de \
    --to=gregkh@suse.de \
    --cc=ak@suse.de \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --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