diff options
author | Christoph Hellwig <hch@lst.de> | 2010-03-10 18:21:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:32 -0500 |
commit | e28cbf22933d0c0ccaf3c4c27a1a263b41f73859 (patch) | |
tree | a93ff48cfd97766a23b2c4f3ea86fccfc9c51d3f /arch/powerpc/kernel/syscalls.c | |
parent | baed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 (diff) |
improve sys_newuname() for compat architectures
On an architecture that supports 32-bit compat we need to override the
reported machine in uname with the 32-bit value. Instead of doing this
separately in every architecture introduce a COMPAT_UTS_MACHINE define in
<asm/compat.h> and apply it directly in sys_newuname().
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/kernel/syscalls.c')
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index 5251221e7a5a..69d3c5d50a54 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c | |||
@@ -132,19 +132,6 @@ static inline int override_machine(char __user *mach) | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | long ppc_newuname(struct new_utsname __user * name) | ||
136 | { | ||
137 | int err = 0; | ||
138 | |||
139 | down_read(&uts_sem); | ||
140 | if (copy_to_user(name, utsname(), sizeof(*name))) | ||
141 | err = -EFAULT; | ||
142 | up_read(&uts_sem); | ||
143 | if (!err) | ||
144 | err = override_machine(name->machine); | ||
145 | return err; | ||
146 | } | ||
147 | |||
148 | int sys_uname(struct old_utsname __user *name) | 135 | int sys_uname(struct old_utsname __user *name) |
149 | { | 136 | { |
150 | int err = 0; | 137 | int err = 0; |