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]
Date:	Sat, 23 Feb 2008 16:14:16 +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>,
	Richard Henderson <rth@...ddle.net>
Subject: [PATCH 13/16] alpha: use get_personality()

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

Signed-off-by: WANG Cong <xiyou.wangcong@...il.com>
Cc: Richard Henderson <rth@...ddle.net>

---
 arch/alpha/kernel/osf_sys.c   |    6 +++---
 include/asm-alpha/processor.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 8c71daf..df825a4 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1266,7 +1266,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 	unsigned long limit;
 
 	/* "32 bit" actually means 31 bit, since pointers sign extend.  */
-	if (current->personality & ADDR_LIMIT_32BIT)
+	if (get_personality() & ADDR_LIMIT_32BIT)
 		limit = 0x80000000;
 	else
 		limit = TASK_SIZE;
@@ -1327,7 +1327,7 @@ osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
 asmlinkage ssize_t
 osf_readv(unsigned long fd, const struct iovec __user * vector, unsigned long count)
 {
-	if (unlikely(personality(current->personality) == PER_OSF4))
+	if (unlikely(personality(get_personality()) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
 	return sys_readv(fd, vector, count);
@@ -1336,7 +1336,7 @@ osf_readv(unsigned long fd, const struct iovec __user * vector, unsigned long co
 asmlinkage ssize_t
 osf_writev(unsigned long fd, const struct iovec __user * vector, unsigned long count)
 {
-	if (unlikely(personality(current->personality) == PER_OSF4))
+	if (unlikely(personality(get_personality()) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
 	return sys_writev(fd, vector, count);
diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h
index 94afe58..6c164b9 100644
--- a/include/asm-alpha/processor.h
+++ b/include/asm-alpha/processor.h
@@ -21,7 +21,7 @@
 #define TASK_SIZE (0x40000000000UL)
 
 #define STACK_TOP \
-  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
+  (get_personality() & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
 
 #define STACK_TOP_MAX	0x00120000000UL
 
@@ -29,7 +29,7 @@
  * space during mmap's.
  */
 #define TASK_UNMAPPED_BASE \
-  ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
+  ((get_personality() & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
 
 typedef struct {
 	unsigned long seg;
-- 
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