]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.arch/s390-personality-mask.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-personality-mask.patch
CommitLineData
00e5a55c
BS
1Subject: [PATCH] fix s390x_newuname
2
3From: Martin Schwidefsky <schwidefsky@de.ibm.com>
4
5The uname system call for 64 bit compares current->personality without
6masking the upper 16 bits. If e.g. READ_IMPLIES_EXEC is set the result
7of a uname system call will always be s390x even if the process uses
8the s390 personality.
9
10Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11Acked-by: John Jolly <jjolly@novell.com>
12---
13 arch/s390/kernel/sys_s390.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16--- a/arch/s390/kernel/sys_s390.c
17+++ b/arch/s390/kernel/sys_s390.c
18@@ -199,7 +199,7 @@ SYSCALL_DEFINE1(s390_newuname, struct ne
19 {
20 int ret = sys_newuname(name);
21
22- if (current->personality == PER_LINUX32 && !ret) {
23+ if (personality(current->personality) == PER_LINUX32 && !ret) {
24 ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
25 if (ret) ret = -EFAULT;
26 }