* [PATCH 1/3] arm64: Remove orphaned __addr_ok() definition
@ 2016-05-24 17:55 Robin Murphy
2016-05-24 17:55 ` [PATCH 2/3] ARM: " Robin Murphy
2016-05-24 17:55 ` [PATCH 3/3] openrisc: " Robin Murphy
0 siblings, 2 replies; 3+ messages in thread
From: Robin Murphy @ 2016-05-24 17:55 UTC (permalink / raw)
To: will.deacon, catalin.marinas; +Cc: linux-arm-kernel, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] ARM: Remove orphaned __addr_ok() definition
2016-05-24 17:55 [PATCH 1/3] arm64: Remove orphaned __addr_ok() definition Robin Murphy
@ 2016-05-24 17:55 ` Robin Murphy
2016-05-24 17:55 ` [PATCH 3/3] openrisc: " Robin Murphy
1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2016-05-24 17:55 UTC (permalink / raw)
To: linux; +Cc: linux-arm-kernel, linux-kernel
Since commit 8c56cc8be5b3 ("ARM: 7449/1: use generic strnlen_user and
strncpy_from_user functions"), the definition of __addr_ok() has been
languishing unused; eradicate the sucker.
CC: Russell King <linux@armlinux.org.uk>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
arch/arm/include/asm/uaccess.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 35c9db857ebe..7badc3e55109 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -104,14 +104,6 @@ static inline void set_fs(mm_segment_t fs)
#define segment_eq(a, b) ((a) == (b))
-#define __addr_ok(addr) ({ \
- unsigned long flag; \
- __asm__("cmp %2, %0; movlo %0, #0" \
- : "=&r" (flag) \
- : "0" (current_thread_info()->addr_limit), "r" (addr) \
- : "cc"); \
- (flag == 0); })
-
/* We use 33-bit arithmetic here... */
#define __range_ok(addr, size) ({ \
unsigned long flag, roksum; \
--
2.8.1.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] openrisc: Remove orphaned __addr_ok() definition
2016-05-24 17:55 [PATCH 1/3] arm64: Remove orphaned __addr_ok() definition Robin Murphy
2016-05-24 17:55 ` [PATCH 2/3] ARM: " Robin Murphy
@ 2016-05-24 17:55 ` Robin Murphy
1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2016-05-24 17:55 UTC (permalink / raw)
To: jonas; +Cc: linux-arm-kernel, linux-kernel
Since commit b48b2c3e5043 ("openrisc: use generic strnlen_user()
function"), the definition of __addr_ok() has been languishing unused;
eradicate the sucker.
CC: Jonas Bonn <jonas@southpole.se>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
arch/openrisc/include/asm/uaccess.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h
index a6bd07ca3d6c..74bcb34c6d0b 100644
--- a/arch/openrisc/include/asm/uaccess.h
+++ b/arch/openrisc/include/asm/uaccess.h
@@ -59,9 +59,6 @@
*/
#define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs()-size))
-/* Ensure that addr is below task's addr_limit */
-#define __addr_ok(addr) ((unsigned long) addr < get_fs())
-
#define access_ok(type, addr, size) \
__range_ok((unsigned long)addr, (unsigned long)size)
--
2.8.1.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-24 18:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 17:55 [PATCH 1/3] arm64: Remove orphaned __addr_ok() definition Robin Murphy
2016-05-24 17:55 ` [PATCH 2/3] ARM: " Robin Murphy
2016-05-24 17:55 ` [PATCH 3/3] openrisc: " Robin Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).