aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorislav Petkov <[email protected]>2019-02-25 20:08:27 +0100
committerBorislav Petkov <[email protected]>2019-02-25 23:13:05 +0100
commit2e7614c0736de93c8796bb2d58debb8871a59db8 (patch)
treece4b0b0fb1ffeff934a0fda26f25fd66703f804d
parentf91fecc09e498529230b4d5053cb361619a0c42d (diff)
x86/uaccess: Remove unused __addr_ok() macro
This was caught while staring at the whole {set,get}_fs() machinery. It's last user, the 32-bit version of strnlen_user() went away with 5723aa993d83 ("x86: use the new generic strnlen_user() function") so drop it. No functional changes. Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Jann Horn <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: the arch/x86 maintainers <[email protected]> Cc: "Tobin C. Harding" <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/x86/include/asm/uaccess.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index a77445d1b034..ec8d36f04786 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -35,10 +35,7 @@ static inline void set_fs(mm_segment_t fs)
}
#define segment_eq(a, b) ((a).seg == (b).seg)
-
#define user_addr_max() (current->thread.addr_limit.seg)
-#define __addr_ok(addr) \
- ((unsigned long __force)(addr) < user_addr_max())
/*
* Test whether a block of memory is a valid user space address.