diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-11-25 13:33:50 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-11-28 05:57:11 -0500 |
commit | 46f7ecb1e7359f183f5bbd1e08b90e10e52164f9 (patch) | |
tree | c2187b3d46150cc2f1c6de1dafce1bb928f73ce0 /kernel/ptrace.c | |
parent | 4c71a2b6fd7e42814aa68a6dec88abf3b42ea573 (diff) |
ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS
The IBPB control code in x86 removed the usage. Remove the functionality
which was introduced for this.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Casey Schaufler <casey.schaufler@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jon Masters <jcm@redhat.com>
Cc: Waiman Long <longman9394@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Dave Stewart <david.c.stewart@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185005.559149393@linutronix.de
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 80b34dffdfb9..c2cee9db5204 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -261,9 +261,6 @@ static int ptrace_check_attach(struct task_struct *child, bool ignore_state) | |||
261 | 261 | ||
262 | static int ptrace_has_cap(struct user_namespace *ns, unsigned int mode) | 262 | static int ptrace_has_cap(struct user_namespace *ns, unsigned int mode) |
263 | { | 263 | { |
264 | if (mode & PTRACE_MODE_SCHED) | ||
265 | return false; | ||
266 | |||
267 | if (mode & PTRACE_MODE_NOAUDIT) | 264 | if (mode & PTRACE_MODE_NOAUDIT) |
268 | return has_ns_capability_noaudit(current, ns, CAP_SYS_PTRACE); | 265 | return has_ns_capability_noaudit(current, ns, CAP_SYS_PTRACE); |
269 | else | 266 | else |
@@ -331,16 +328,9 @@ ok: | |||
331 | !ptrace_has_cap(mm->user_ns, mode))) | 328 | !ptrace_has_cap(mm->user_ns, mode))) |
332 | return -EPERM; | 329 | return -EPERM; |
333 | 330 | ||
334 | if (mode & PTRACE_MODE_SCHED) | ||
335 | return 0; | ||
336 | return security_ptrace_access_check(task, mode); | 331 | return security_ptrace_access_check(task, mode); |
337 | } | 332 | } |
338 | 333 | ||
339 | bool ptrace_may_access_sched(struct task_struct *task, unsigned int mode) | ||
340 | { | ||
341 | return __ptrace_may_access(task, mode | PTRACE_MODE_SCHED); | ||
342 | } | ||
343 | |||
344 | bool ptrace_may_access(struct task_struct *task, unsigned int mode) | 334 | bool ptrace_may_access(struct task_struct *task, unsigned int mode) |
345 | { | 335 | { |
346 | int err; | 336 | int err; |