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  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:   Mon, 25 Feb 2019 14:43:20 -0800
From:   tip-bot for Borislav Petkov <>
Subject: [tip:x86/cleanups] x86/uaccess: Remove unused __addr_ok() macro

Commit-ID:  2e7614c0736de93c8796bb2d58debb8871a59db8
Author:     Borislav Petkov <>
AuthorDate: Mon, 25 Feb 2019 20:08:27 +0100
Committer:  Borislav Petkov <>
CommitDate: Mon, 25 Feb 2019 23:13:05 +0100

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 <>
Acked-by: Linus Torvalds <>
Cc: Andy Lutomirski <>
Cc: Jann Horn <>
Cc: Peter Zijlstra <>
Cc: the arch/x86 maintainers <>
Cc: "Tobin C. Harding" <>
 arch/x86/include/asm/uaccess.h | 3 ---
 1 file changed, 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.

Powered by blists - more mailing lists