public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/8] extend make headers_check to detect more problems
Date: Sat, 23 Sep 2006 15:18:15 +0200	[thread overview]
Message-ID: <200609231518.16201.arnd@arndb.de> (raw)
In-Reply-To: <1159009461.24527.920.camel@pmac.infradead.org>

On Saturday 23 September 2006 13:04, David Woodhouse wrote:
> It would be good to fix these problems, it's true -- but bear in mind
> that none of these are actually fatal problems -- they're just caveats
> of (ab)using kernel-private headers in userspace. 
> 
> On the other hand, it would be good to get people used to running
> 'make headers_check' whenever they make a change -- so introducing more
> breakage right now may be counterproductive from that point of view.
> 
> So I think I'd prefer to leave this for now, or at least limit it to
> 'make CHECKMEHARDER=1 headers_check' so that we can wean people onto
> using headers_check slowly and relatively painlessly.

yes, that sounds fair.

> > I found many problems with this, which I then fixed for
> > powerpc, s390 and i386, in subsequent patches.
> 
> Can you -include <linux/types.h> _every_ time, to reduce the number of
> places you have to add '/* @headercheck: -include linux/types.h @ */' ?

The problem with this are a few files which have code like

#ifndef __KERNEL__
#include <sys/types.h>
#include <stdint.h>
#endif

or similar. These break heavily if you include <linux/types.h> before the
the glibc provided headers, because linux/types.h provides some of the
types that are normally defined elsewhere and duplicate typedefs result
in compile errors.

To solve this, we would need to make all headers build fine with
gcc -D__STRICT_KERNEL_NAMES -include linux/types.h.
That is a valueable goal as well, since it avoids a number of problems,
but it is actually a larger change than this.

Now one option we could take would be to always pass -include linux/types.h
to gcc and put /* @headercheck: -D__STRICT_KERNEL_NAMES */ into the few
places that break otherwise.

	Arnd <><

  reply	other threads:[~2006-09-23 13:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1158079495.9189.125.camel@hades.cambridge.redhat.com>
2006-09-18  1:27 ` [patch 0/8] Re: All arch maintainers: 'make headers_check' fails on most architectures Arnd Bergmann
2006-09-18  1:27 ` [patch 1/8] extend make headers_check to detect more problems Arnd Bergmann
2006-09-18  6:21   ` Sam Ravnborg
2006-09-18  6:45     ` David Woodhouse
2006-09-21 15:13       ` David Woodhouse
2006-09-18  8:05     ` Arnd Bergmann
2006-09-18  8:10       ` David Woodhouse
2006-09-23 11:04   ` David Woodhouse
2006-09-23 13:18     ` Arnd Bergmann [this message]
2006-09-18  1:27 ` [patch 2/8] fix byteorder headers for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 3/8] hide kernel-only parts of some installed headers Arnd Bergmann
2006-09-18  1:27 ` [patch 4/8] fix exported flock64 constants Arnd Bergmann
2006-09-18  1:27 ` [patch 5/8] add missing #includes in user space parts of headers Arnd Bergmann
2006-09-18  1:27 ` [patch 6/8] annotate header files for make headers_check Arnd Bergmann
2006-09-18  1:27 ` [patch 8/8] annotate netfilter header " Arnd Bergmann
2006-09-18  1:37 ` [patch 7/8] annotate if_* " Arnd Bergmann

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=200609231518.16201.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.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