]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.arch/s390-personality-mask.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-personality-mask.patch
1 Subject: [PATCH] fix s390x_newuname
2
3 From: Martin Schwidefsky <schwidefsky@de.ibm.com>
4
5 The uname system call for 64 bit compares current->personality without
6 masking the upper 16 bits. If e.g. READ_IMPLIES_EXEC is set the result
7 of a uname system call will always be s390x even if the process uses
8 the s390 personality.
9
10 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 Acked-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 }