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: <1203754579637-git-send-email-xiyou.wangcong@gmail.com>
Date:	Sat, 23 Feb 2008 16:14:15 +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>,
	Tony Luck <tony.luck@...el.com>
Subject: [PATCH 12/16] ia64: use get_personality()

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

Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>
Cc: Tony Luck <tony.luck@...el.com>

---
 arch/ia64/ia32/sys_ia32.c |    2 +-
 arch/ia64/mm/init.c       |    2 +-
 include/asm-ia64/fcntl.h  |    2 +-
 include/asm-ia64/namei.h  |    2 +-
 include/asm-ia64/page.h   |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index d025a22..a91273f 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -2265,7 +2265,7 @@ sys32_personality (unsigned int personality)
 {
 	long 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/ia64/mm/init.c b/arch/ia64/mm/init.c
index 25aef62..f5641bb 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -139,7 +139,7 @@ ia64_init_addr_space (void)
 	}
 
 	/* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
-	if (!(current->personality & MMAP_PAGE_ZERO)) {
+	if (!(get_personality() & MMAP_PAGE_ZERO)) {
 		vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
 		if (vma) {
 			vma->vm_mm = current->mm;
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h
index 1dd275d..e8acf85 100644
--- a/include/asm-ia64/fcntl.h
+++ b/include/asm-ia64/fcntl.h
@@ -6,7 +6,7 @@
  */
 
 #define force_o_largefile()	\
-		(personality(current->personality) != PER_LINUX32)
+		(personality(get_personality()) != PER_LINUX32)
 
 #include <asm-generic/fcntl.h>
 
diff --git a/include/asm-ia64/namei.h b/include/asm-ia64/namei.h
index 78e7680..da38e5c 100644
--- a/include/asm-ia64/namei.h
+++ b/include/asm-ia64/namei.h
@@ -14,7 +14,7 @@
 static inline char *
 __emul_prefix (void)
 {
-	switch (current->personality) {
+	switch (get_personality()) {
 	      case PER_LINUX32:
 		return EMUL_PREFIX_LINUX_IA32;
 	      default:
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 4999a6c..287e53b 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -224,7 +224,7 @@ get_order (unsigned long size)
 
 #define VM_DATA_DEFAULT_FLAGS		(VM_READ | VM_WRITE |					\
 					 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC |		\
-					 (((current->personality & READ_IMPLIES_EXEC) != 0)	\
+					 (((get_personality() & READ_IMPLIES_EXEC) != 0)	\
 					  ? VM_EXEC : 0))
 
 #endif /* _ASM_IA64_PAGE_H */
-- 
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