public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tobin@kernel.org, jannh@google.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, peterz@infradead.org, bp@suse.de,
	torvalds@linux-foundation.org, x86@kernel.org, luto@kernel.org,
	mingo@kernel.org, hpa@zytor.com
Subject: [tip:x86/cleanups] x86/uaccess: Remove unused __addr_ok() macro
Date: Mon, 25 Feb 2019 14:43:20 -0800	[thread overview]
Message-ID: <tip-2e7614c0736de93c8796bb2d58debb8871a59db8@git.kernel.org> (raw)
In-Reply-To: <20190225191109.7671-1-bp@alien8.de>

Commit-ID:  2e7614c0736de93c8796bb2d58debb8871a59db8
Gitweb:     https://git.kernel.org/tip/2e7614c0736de93c8796bb2d58debb8871a59db8
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 25 Feb 2019 20:08:27 +0100
Committer:  Borislav Petkov <bp@suse.de>
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 <bp@suse.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: the arch/x86 maintainers <x86@kernel.org>
Cc: "Tobin C. Harding" <tobin@kernel.org>
Link: https://lkml.kernel.org/r/20190225191109.7671-1-bp@alien8.de
---
 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.

      parent reply	other threads:[~2019-02-25 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 19:11 [PATCH] x86/uaccess: Remove unused __addr_ok() macro Borislav Petkov
2019-02-25 19:20 ` Linus Torvalds
2019-02-25 19:42   ` Borislav Petkov
2019-02-25 21:08     ` Joe Perches
2019-03-04  6:47       ` Christian Kujau
2019-03-27 13:15         ` Borislav Petkov
2019-02-25 22:43 ` tip-bot for Borislav Petkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-2e7614c0736de93c8796bb2d58debb8871a59db8@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tobin@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox