From: Peter Samuelson <peter@cadcamlab.org>
To: "Mohammad A. Haque" <mhaque@haque.net>
Cc: "Adam J. Richter" <adam@yggdrasil.com>,
linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: PATCH: linux-2.4.0-test12pre8/include/linux/module.h breaks sysklogd compilation
Date: Mon, 11 Dec 2000 19:53:05 -0600 [thread overview]
Message-ID: <20001211195305.B3199@cadcamlab.org> (raw)
In-Reply-To: <20001211145901.A8047@baldur.yggdrasil.com> <3A357BC4.AC568471@haque.net>
In-Reply-To: <3A357BC4.AC568471@haque.net>; from mhaque@haque.net on Mon, Dec 11, 2000 at 08:13:40PM -0500
[Mohammad A. Haque]
> Wasn't there discussion that user space apps shouldn't include kernel
> headers?
Oh, it's been discussed, many times. Here is my executive summary of
why nobody needs to use kernel headers in userspace programs, *EVER*:
Q: I want to #include <linux/foo.h> but I get compile errors, please
apply this patch to foo.h.
A: Make a copy of foo.h, fix it up to compile properly in your
application and ship it in your tarball.
Q: What if foo.h changes? My copy will be out of date and my app will
not work properly on new kernels.
A: This is exactly the same problem as userspace ABI drift. And it has
exactly the same solution: make sure userspace interfaces to kernel
functionality are as stable as possible. We really *do* try not to
gratuitously break binaries ... except certain system utilities
which are low-level enough to justify telling the user to upgrade
(and that's a short list -- see Documentation/Changes.)
Q: What about new features? What if foo.h gets some new ioctl
definitions? My copy won't have these and my app won't be able to
use them.
A: So resync with the kernel copy, when the need arises. Obviously
your app won't magically be able to just use the new functionality
without other changes on your part -- resyncing foo.h is just a
small part of the changes you are already making anyway.
Q: I maintain a subsystem with tightly-coupled userspace and kernel
components.
A: So maintain *your* header files however you wish, but just ship
separate copies in your kernel patches and userspace tarballs.
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-12 2:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-11 22:59 PATCH: linux-2.4.0-test12pre8/include/linux/module.h breaks sysklogd compilation Adam J. Richter
2000-12-12 1:05 ` Keith Owens
2000-12-12 1:15 ` Cort Dougan
2000-12-12 1:13 ` Mohammad A. Haque
2000-12-12 1:53 ` Peter Samuelson [this message]
2000-12-12 20:38 ` Frank van Maarseveen
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=20001211195305.B3199@cadcamlab.org \
--to=peter@cadcamlab.org \
--cc=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhaque@haque.net \
--cc=torvalds@transmeta.com \
/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