From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Lubos Lunak <l.lunak@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RESEND] do not redefine userspace's NULL #define
Date: Mon, 16 Apr 2012 09:43:55 +0200 [thread overview]
Message-ID: <20120416094355.53309edb@de.ibm.com> (raw)
In-Reply-To: <201204132102.14873.arnd@arndb.de>
On Fri, 13 Apr 2012 21:02:14 +0000
Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 13 April 2012, Linus Torvalds wrote:
> > There's no way user should ever include the linux internal stddef.h.
> >
> > And quite frankly, kernel-external definitions of NULL have
> > traditionally been pure sh*t (ie plain "0" without the cast to a
> > pointer), so I'm not entirely convinced about this patch.
> >
> > So what is the actual thing this helps with?
>
> I think it used to get included implictly though other exported
> kernel headers, but I found only one instance where this is still
> true, in the s390 version of asm/ptrace.h.
>
> Martin, does this work for you?
>
> 8<-----
> headers: do not export linux/stddef.h
>
> There is no reason to export linux/stddef.h and users should never
> include it because the header conflicts with the standard stddef.h.
>
> The only other exported header file that actually includes linux/stddef.h
> is the s390 asm/ptrace.h, but there is no reason for it to do so, so
> we can remove both the export and the inclusion.
> When the file is no longer exported, we can also remove the extra lines
> that attempt to make it safe for inclusion
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Kernel compiles and boots. After protecting the stddef.h #include in
include/linux/posix_types.h with #ifdef __KERNEL__ gdb and strace
could be build as well.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2012-04-16 7:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 19:24 [PATCH][RESEND] do not redefine userspace's NULL #define Lubos Lunak
2012-04-13 19:39 ` Linus Torvalds
2012-04-13 21:02 ` Arnd Bergmann
2012-04-16 7:43 ` Martin Schwidefsky [this message]
2012-04-13 21:46 ` Lubos Lunak
2012-04-14 8:28 ` Arnd Bergmann
2012-04-13 22:01 ` Peter Seebach
2012-04-13 22:24 ` Linus Torvalds
2012-04-13 23:18 ` Lubos Lunak
2012-04-14 0:44 ` Linus Torvalds
2012-04-14 6:43 ` Lubos Lunak
2012-04-14 7:51 ` Linus Torvalds
2012-04-14 8:21 ` Lubos Lunak
2012-04-14 8:27 ` Linus Torvalds
2012-04-14 8:54 ` Lubos Lunak
2012-04-14 9:30 ` 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=20120416094355.53309edb@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=l.lunak@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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