From: Pavel Roskin <proski@gnu.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: David Miller <davem@davemloft.net>,
linville@tuxdriver.com, linux-wireless@vger.kernel.org,
kirill@shutemov.name
Subject: Re: [PATCH] wireless.h: improve userland include-ability
Date: Wed, 04 Jun 2008 11:24:15 -0400 [thread overview]
Message-ID: <1212593055.13964.15.camel@dv> (raw)
In-Reply-To: <1212587529.32207.82.camel@pmac.infradead.org>
On Wed, 2008-06-04 at 14:52 +0100, David Woodhouse wrote:
> On Tue, 2008-06-03 at 12:05 -0700, David Miller wrote:
> > Yeah, go check so me magic userspace tool header to see what magic is
> > needed just to include a core networking header file correctly.
> >
> > No, thanks.
>
> Just to clarify: this is only a problem for userspace, and you're
> objecting to that? Just including <linux/wireless.h> within the kernel
> will continue to work.
>
> We've traditionally got away with saying 'caveat emptor' when userspace
> includes kernel headers -- you _have_ to include the right
> prerequisites, because the kernel doesn't do it for you.
That's true, and several programs do it already. Changing the includes
would require changes in those programs. Besides, sys/types.h is still
included, so it's a half-measure. If we are going to break things,
let's go all the way and disable sys/types.h for userspace, and possibly
some structures that the userspace is not supposed to be using. But I'm
afraid there is still a lot of stuff the userspace should know,
including IFNAMESIZ. Alternatively, let's sanitize other headers so
that they can be mixed with libc headers with no consequences.
Hand picking which headers to include in userspace reeks of a hack meant
to satisfy special needs of some userspace software, while risking to
break other userspace code.
Finally, wireless extensions are not under development. If should be
perfectly safe to take the latest wireless.h, copy it to the userspace
program and rearrange the headers to the heart's content.
> I believe that the main reason for this patch was that <linux/socket.h>
> and <linux/if.h> both have problems when you include them in the same C
> file as the 'proper' glibc equivalent? Is that something we can address,
> instead of just dropping those includes?
I don't see such problems in my software, but if others do, they may be
in a better position to suggest patches.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-06-04 15:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 17:51 [PATCH] wireless.h: improve userland include-ability John W. Linville
2008-06-03 19:05 ` David Miller
2008-06-04 13:52 ` David Woodhouse
2008-06-04 14:23 ` Kirill A. Shutemov
2008-06-04 14:26 ` David Woodhouse
2008-06-04 14:56 ` David Woodhouse
2008-06-04 15:02 ` David Miller
2008-06-04 15:26 ` David Woodhouse
2008-06-04 15:47 ` David Miller
2008-06-04 15:50 ` David Woodhouse
2008-06-04 15:24 ` Pavel Roskin [this message]
2008-06-04 17:34 ` John W. Linville
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=1212593055.13964.15.camel@dv \
--to=proski@gnu.org \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=kirill@shutemov.name \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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