From: Adrian Bunk <bunk@kernel.org>
To: Jeff Chua <jeff.chua.linux@gmail.com>,
Joe Perches <joe@perches.com>, Ingo Molnar <mingo@elte.hu>,
tglx@linutronix.de, hpa@zytor.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [2.6 patch] fix asm-x86/{posix_types,unistd}.h
Date: Sun, 20 Apr 2008 22:02:17 +0300 [thread overview]
Message-ID: <20080420190217.GA14788@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <Pine.LNX.4.64.0804192351220.3260@boston.corp.fedex.com>
On Sun, Apr 20, 2008 at 12:04:53AM +0800, Jeff Chua wrote:
>
> Linus,
>
> The latest git download changes the behavior of posix_types.h such that
> non-kernel programs are no longer able to include posix types (e.g.
> xserver can no longer be compiled).
>
> I don't know whether this is intended or a bug.
Thanks for reporting this bug.
Commit e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9
(x86: cleanup duplicate includes) contains no indication
this was intentional.
@Joe:
Please be more careful in the future.
@Ingo:
A proper review of the patch could have caught this bug that now made it
into a stable kernel.
> Attached is a patch to allow __i386__ as was done in the past.
>
> Thanks,
> Jeff.
>
>
> --- linux-2.6/include/asm-x86/posix_types.h.org 2008-04-19 16:53:03 +0800
> +++ linux-2.6/include/asm-x86/posix_types.h 2008-04-19 16:51:48 +0800
> @@ -1,5 +1,5 @@
> -#ifdef __KERNEL__
> -# if defined(CONFIG_X86_32) || defined(__i386__)
> +#if defined(__KERNEL__) || defined(__i386__)
> +# if defined(CONFIG_X86_32)
> # include "posix_types_32.h"
> # else
> # include "posix_types_64.h"
This doesn't look as if it will work with 64bit userspace.
A patch that reverts the bogus changes to asm-x86/posix_types.h and
asm-x86/unistd.h (which suffers from the same breakage) is below.
cu
Adrian
<-- snip -->
Commit e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9
(x86: cleanup duplicate includes) turned the userspace
asm-x86/posix_types.h and asm-x86/unistd.h headers into
empty files.
This patch reverts these bogus changes.
Reported-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
include/asm-x86/posix_types.h | 8 +++++++-
include/asm-x86/unistd.h | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
ab170018723af65f4020db74757e4949d110963a diff --git a/include/asm-x86/posix_types.h b/include/asm-x86/posix_types.h
index fe312a5..bb7133d 100644
--- a/include/asm-x86/posix_types.h
+++ b/include/asm-x86/posix_types.h
@@ -1,5 +1,11 @@
#ifdef __KERNEL__
-# if defined(CONFIG_X86_32) || defined(__i386__)
+# ifdef CONFIG_X86_32
+# include "posix_types_32.h"
+# else
+# include "posix_types_64.h"
+# endif
+#else
+# ifdef __i386__
# include "posix_types_32.h"
# else
# include "posix_types_64.h"
diff --git a/include/asm-x86/unistd.h b/include/asm-x86/unistd.h
index effc7ad..2a58ed3 100644
--- a/include/asm-x86/unistd.h
+++ b/include/asm-x86/unistd.h
@@ -1,5 +1,11 @@
#ifdef __KERNEL__
-# if defined(CONFIG_X86_32) || defined(__i386__)
+# ifdef CONFIG_X86_32
+# include "unistd_32.h"
+# else
+# include "unistd_64.h"
+# endif
+#else
+# ifdef __i386__
# include "unistd_32.h"
# else
# include "unistd_64.h"
next prev parent reply other threads:[~2008-04-20 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-19 16:04 [PATCH] Linux 2.6.25 - posix_types.h Jeff Chua
2008-04-20 19:02 ` Adrian Bunk [this message]
2008-04-21 14:24 ` [2.6 patch] fix asm-x86/{posix_types,unistd}.h Jeff Chua
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=20080420190217.GA14788@cs181133002.pp.htv.fi \
--to=bunk@kernel.org \
--cc=hpa@zytor.com \
--cc=jeff.chua.linux@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®