sh: Prevent leaking of CONFIG_SUPERH32 to userspace in asm/unistd.h.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:05 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=82706b...
Commit:     82706b8f7bd1365e50478d3d0f6090f22e4571c7
Parent:     45dabf1427a0a876f733b07239ade1bdb0e06010
Author:     Khem Raj <raj.khem@gmail.com>
AuthorDate: Thu Jul 3 19:02:41 2008 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Mon Jul 28 18:10:27 2008 +0900

    sh: Prevent leaking of CONFIG_SUPERH32 to userspace in asm/unistd.h.
    
    CONFIG_SUPERH32 is currently trickling into userspace unistd.h. Attached
    patch uses __SH5__ define in userspace.
    
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
 include/asm-sh/unistd.h |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index 4b21f36..65be656 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -1,5 +1,13 @@
-#ifdef CONFIG_SUPERH32
-# include "unistd_32.h"
+#ifdef __KERNEL__
+# ifdef CONFIG_SUPERH32
+#  include "unistd_32.h"
+# else
+#  include "unistd_64.h"
+# endif
 #else
-# include "unistd_64.h"
+# ifdef __SH5__
+#  include "unistd_64.h"
+# else
+#  include "unistd_32.h"
+# endif
 #endif
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: Prevent leaking of CONFIG_SUPERH32 to userspace in asm ..., Linux Kernel Mailing ..., (Mon Jul 28, 10:05 am)