lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <12037545611159-git-send-email-xiyou.wangcong@gmail.com>
Date:	Sat, 23 Feb 2008 16:14:13 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	WANG Cong <xiyou.wangcong@...il.com>, schwidefsky@...ibm.com,
	heiko.carstens@...ibm.com
Subject: [PATCH 10/16] s390: use get_personality()

Use get_personality() macro instead of explicit reference
for s390 code.

Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>
Cc: schwidefsky@...ibm.com
Cc: heiko.carstens@...ibm.com

---
 arch/s390/kernel/binfmt_elf32.c |    2 +-
 arch/s390/kernel/sys_s390.c     |    4 ++--
 arch/s390/mm/mmap.c             |    2 +-
 include/asm-s390/elf.h          |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
index 3e1c315..6a55911 100644
--- a/arch/s390/kernel/binfmt_elf32.c
+++ b/arch/s390/kernel/binfmt_elf32.c
@@ -78,7 +78,7 @@
 do {							\
 	if (ibcs2)                                      \
 		set_personality(PER_SVR4);              \
-	else if (current->personality != PER_LINUX32)   \
+	else if (get_personality() != PER_LINUX32)   \
 		set_personality(PER_LINUX);             \
 	set_thread_flag(TIF_31BIT);			\
 } while (0)
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index fefee99..f8371fe 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -215,7 +215,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name)
 {
 	int ret = sys_newuname(name);
 
-	if (current->personality == PER_LINUX32 && !ret) {
+	if (get_personality() == PER_LINUX32 && !ret) {
 		ret = copy_to_user(name->machine, "s390\0\0\0\0", 8);
 		if (ret) ret = -EFAULT;
 	}
@@ -226,7 +226,7 @@ asmlinkage long s390x_personality(unsigned long personality)
 {
 	int ret;
 
-	if (current->personality == PER_LINUX32 && personality == PER_LINUX)
+	if (get_personality() == PER_LINUX32 && personality == PER_LINUX)
 		personality = PER_LINUX32;
 	ret = sys_personality(personality);
 	if (ret == PER_LINUX32)
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index 5932a82..f5bf304 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -59,7 +59,7 @@ static inline int mmap_is_legacy(void)
 		return 1;
 #endif
 	return sysctl_legacy_va_layout ||
-	    (current->personality & ADDR_COMPAT_LAYOUT) ||
+	    (get_personality() & ADDR_COMPAT_LAYOUT) ||
 	    current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY;
 }
 
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h
index b3ac262..18482d3 100644
--- a/include/asm-s390/elf.h
+++ b/include/asm-s390/elf.h
@@ -202,7 +202,7 @@ extern char elf_platform[];
 do {							\
 	if (ibcs2)					\
 		set_personality(PER_SVR4);		\
-	else if (current->personality != PER_LINUX32)	\
+	else if (get_personality() != PER_LINUX32)	\
 		set_personality(PER_LINUX);		\
 	clear_thread_flag(TIF_31BIT);			\
 } while (0)
-- 
1.5.3.8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ