Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1406338

[PATCH 1/3] arm64: Remove orphaned __addr_ok() definition

From Robin Murphy <robin.murphy@arm.com>
Newsgroups linux.kernel
Subject [PATCH 1/3] arm64: Remove orphaned __addr_ok() definition
Date 2016-05-24 20:10 +0200
Message-ID <rCoWd-6FE-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Since commit 12a0ef7b0ac3 ("arm64: use generic strnlen_user and
strncpy_from_user functions"), the definition of __addr_ok() has been
languishing unused; eradicate the sucker.

CC: Will Deacon <will.deacon@arm.com>
CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 arch/arm64/include/asm/uaccess.h | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
index 0685d74572af..9e397a542756 100644
--- a/arch/arm64/include/asm/uaccess.h
+++ b/arch/arm64/include/asm/uaccess.h
@@ -81,19 +81,6 @@ static inline void set_fs(mm_segment_t fs)
 #define segment_eq(a, b)	((a) == (b))
 
 /*
- * Return 1 if addr < current->addr_limit, 0 otherwise.
- */
-#define __addr_ok(addr)							\
-({									\
-	unsigned long flag;						\
-	asm("cmp %1, %0; cset %0, lo"					\
-		: "=&r" (flag)						\
-		: "r" (addr), "0" (current_thread_info()->addr_limit)	\
-		: "cc");						\
-	flag;								\
-})
-
-/*
  * Test whether a block of memory is a valid user space address.
  * Returns 1 if the range is valid, 0 otherwise.
  *
-- 
2.8.1.dirty

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] arm64: Remove orphaned __addr_ok() definition Robin Murphy <robin.murphy@arm.com> - 2016-05-24 20:10 +0200
  [PATCH 2/3] ARM: Remove orphaned __addr_ok() definition Robin Murphy <robin.murphy@arm.com> - 2016-05-24 20:10 +0200
  [PATCH 3/3] openrisc: Remove orphaned __addr_ok() definition Robin Murphy <robin.murphy@arm.com> - 2016-05-24 20:10 +0200

csiph-web