From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, catalin.marinas@arm.com,
robin.murphy@arm.com, james.morse@arm.com, will@kernel.org,
hch@lst.de
Subject: [PATCHv3 15/17] arm64: uaccess: remove addr_limit_user_check()
Date: Mon, 26 Oct 2020 13:31:54 +0000 [thread overview]
Message-ID: <20201026133156.44186-16-mark.rutland@arm.com> (raw)
In-Reply-To: <20201026133156.44186-1-mark.rutland@arm.com>
Now that set_fs() is gone, addr_limit_user_check() is redundant. Remove
the checks and associated thread flag.
To ensure that _TIF_WORK_MASK can be used as an immediate value in an
AND instruction (as it is in `ret_to_user`), TIF_MTE_ASYNC_FAULT is
renumbered to keep the constituent bits of _TIF_WORK_MASK contiguous.
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
---
arch/arm64/include/asm/thread_info.h | 6 ++----
arch/arm64/kernel/signal.c | 3 ---
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 3a88a55de568e..015beafe58f53 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -63,8 +63,7 @@ void arch_release_task_struct(struct task_struct *tsk);
#define TIF_NOTIFY_RESUME 2 /* callback before returning to user */
#define TIF_FOREIGN_FPSTATE 3 /* CPU's FP state is not current's */
#define TIF_UPROBE 4 /* uprobe breakpoint or singlestep */
-#define TIF_FSCHECK 5 /* Check FS is USER_DS on return */
-#define TIF_MTE_ASYNC_FAULT 6 /* MTE Asynchronous Tag Check Fault */
+#define TIF_MTE_ASYNC_FAULT 5 /* MTE Asynchronous Tag Check Fault */
#define TIF_SYSCALL_TRACE 8 /* syscall trace active */
#define TIF_SYSCALL_AUDIT 9 /* syscall auditing */
#define TIF_SYSCALL_TRACEPOINT 10 /* syscall tracepoint for ftrace */
@@ -90,7 +89,6 @@ void arch_release_task_struct(struct task_struct *tsk);
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
#define _TIF_UPROBE (1 << TIF_UPROBE)
-#define _TIF_FSCHECK (1 << TIF_FSCHECK)
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_32BIT (1 << TIF_32BIT)
#define _TIF_SVE (1 << TIF_SVE)
@@ -98,7 +96,7 @@ void arch_release_task_struct(struct task_struct *tsk);
#define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
_TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \
- _TIF_UPROBE | _TIF_FSCHECK | _TIF_MTE_ASYNC_FAULT)
+ _TIF_UPROBE | _TIF_MTE_ASYNC_FAULT)
#define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
_TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
index a8184cad88907..af5c6c6638f7b 100644
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@ -922,9 +922,6 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
trace_hardirqs_off();
do {
- /* Check valid user FS if needed */
- addr_limit_user_check();
-
if (thread_flags & _TIF_NEED_RESCHED) {
/* Unmask Debug and SError for the next task */
local_daif_restore(DAIF_PROCCTX_NOIRQ);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-26 13:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 13:31 [PATCHv3 00/17] arm64: remove set_fs() and friends Mark Rutland
2020-10-26 13:31 ` [PATCHv3 01/17] arm64: ensure ERET from kthread is illegal Mark Rutland
2020-10-26 13:31 ` [PATCHv3 02/17] arm64: add C wrappers for SET_PSTATE_*() Mark Rutland
2020-10-26 13:31 ` [PATCHv3 03/17] arm64: head.S: rename el2_setup -> init_kernel_el Mark Rutland
2020-10-26 13:31 ` [PATCHv3 04/17] arm64: head.S: cleanup SCTLR_ELx initialization Mark Rutland
2020-10-26 13:31 ` [PATCHv3 05/17] arm64: head.S: always initialize PSTATE Mark Rutland
2020-10-26 13:31 ` [PATCHv3 06/17] arm64: sdei: move uaccess logic to arch/arm64/ Mark Rutland
2020-10-26 13:31 ` [PATCHv3 07/17] arm64: sdei: explicitly simulate PAN/UAO entry Mark Rutland
2020-10-26 13:31 ` [PATCHv3 08/17] arm64: uaccess: move uao_* alternatives to asm-uaccess.h Mark Rutland
2020-11-03 14:26 ` Will Deacon
2020-11-03 14:41 ` Mark Rutland
2020-10-26 13:31 ` [PATCHv3 09/17] arm64: uaccess: rename privileged uaccess routines Mark Rutland
2020-10-26 13:31 ` [PATCHv3 10/17] arm64: uaccess: simplify __copy_user_flushcache() Mark Rutland
2020-10-27 17:33 ` Robin Murphy
2020-11-02 10:14 ` Mark Rutland
2020-10-26 13:31 ` [PATCHv3 11/17] arm64: uaccess: refactor __{get,put}_user Mark Rutland
2020-10-27 18:03 ` Robin Murphy
2020-11-02 10:25 ` Mark Rutland
2020-10-26 13:31 ` [PATCHv3 12/17] arm64: uaccess: split user/kernel routines Mark Rutland
2020-11-02 10:48 ` Mark Rutland
2020-10-26 13:31 ` [PATCHv3 13/17] arm64: uaccess cleanup macro naming Mark Rutland
2020-10-27 18:45 ` Robin Murphy
2020-11-02 10:35 ` Mark Rutland
2020-10-26 13:31 ` [PATCHv3 14/17] arm64: uaccess: remove set_fs() Mark Rutland
2020-10-26 13:31 ` Mark Rutland [this message]
2020-10-26 13:31 ` [PATCHv3 16/17] arm64: uaccess: remove redundant PAN toggling Mark Rutland
2020-10-26 13:31 ` [PATCHv3 17/17] arm64: uaccess: remove vestigal UAO support Mark Rutland
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=20201026133156.44186-16-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=catalin.marinas@arm.com \
--cc=hch@lst.de \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
--cc=will@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