* [PATCH] Fix compat uname machine
@ 2010-04-15 16:28 Andreas Schwab
2010-04-15 17:00 ` Christoph Hellwig
2010-04-15 22:35 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Schwab @ 2010-04-15 16:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Christoph Hellwig
Mask off personality flags when checking for PER_LINUX32.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
---
On ppc64 you get this error:
$ setarch ppc -R true
setarch: ppc: Unrecognized architecture
because uname still reports ppc64 as the machine.
Andreas.
---
kernel/sys.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index 6d1a7e0..7cb426a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1118,7 +1118,7 @@ DECLARE_RWSEM(uts_sem);
#ifdef COMPAT_UTS_MACHINE
#define override_architecture(name) \
- (current->personality == PER_LINUX32 && \
+ (personality(current->personality) == PER_LINUX32 && \
copy_to_user(name->machine, COMPAT_UTS_MACHINE, \
sizeof(COMPAT_UTS_MACHINE)))
#else
--
1.7.0.4
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix compat uname machine
2010-04-15 16:28 [PATCH] Fix compat uname machine Andreas Schwab
@ 2010-04-15 17:00 ` Christoph Hellwig
2010-04-15 22:35 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2010-04-15 17:00 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linux-kernel, Christoph Hellwig
On Thu, Apr 15, 2010 at 06:28:33PM +0200, Andreas Schwab wrote:
> Mask off personality flags when checking for PER_LINUX32.
>
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
> On ppc64 you get this error:
>
> $ setarch ppc -R true
> setarch: ppc: Unrecognized architecture
>
> because uname still reports ppc64 as the machine.
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix compat uname machine
2010-04-15 16:28 [PATCH] Fix compat uname machine Andreas Schwab
2010-04-15 17:00 ` Christoph Hellwig
@ 2010-04-15 22:35 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-04-15 22:35 UTC (permalink / raw)
To: schwab; +Cc: linux-kernel, hch
From: Andreas Schwab <schwab@linux-m68k.org>
Date: Thu, 15 Apr 2010 18:28:33 +0200
> Mask off personality flags when checking for PER_LINUX32.
>
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-15 22:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 16:28 [PATCH] Fix compat uname machine Andreas Schwab
2010-04-15 17:00 ` Christoph Hellwig
2010-04-15 22:35 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.