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 /include/linux/ptrace.h | |
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 'include/linux/ptrace.h')
-rw-r--r-- | include/linux/ptrace.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 6c2ffed907f5..de20ede2c5c8 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -64,15 +64,12 @@ extern void exit_ptrace(struct task_struct *tracer, struct list_head *dead); | |||
64 | #define PTRACE_MODE_NOAUDIT 0x04 | 64 | #define PTRACE_MODE_NOAUDIT 0x04 |
65 | #define PTRACE_MODE_FSCREDS 0x08 | 65 | #define PTRACE_MODE_FSCREDS 0x08 |
66 | #define PTRACE_MODE_REALCREDS 0x10 | 66 | #define PTRACE_MODE_REALCREDS 0x10 |
67 | #define PTRACE_MODE_SCHED 0x20 | ||
68 | #define PTRACE_MODE_IBPB 0x40 | ||
69 | 67 | ||
70 | /* shorthands for READ/ATTACH and FSCREDS/REALCREDS combinations */ | 68 | /* shorthands for READ/ATTACH and FSCREDS/REALCREDS combinations */ |
71 | #define PTRACE_MODE_READ_FSCREDS (PTRACE_MODE_READ | PTRACE_MODE_FSCREDS) | 69 | #define PTRACE_MODE_READ_FSCREDS (PTRACE_MODE_READ | PTRACE_MODE_FSCREDS) |
72 | #define PTRACE_MODE_READ_REALCREDS (PTRACE_MODE_READ | PTRACE_MODE_REALCREDS) | 70 | #define PTRACE_MODE_READ_REALCREDS (PTRACE_MODE_READ | PTRACE_MODE_REALCREDS) |
73 | #define PTRACE_MODE_ATTACH_FSCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_FSCREDS) | 71 | #define PTRACE_MODE_ATTACH_FSCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_FSCREDS) |
74 | #define PTRACE_MODE_ATTACH_REALCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_REALCREDS) | 72 | #define PTRACE_MODE_ATTACH_REALCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_REALCREDS) |
75 | #define PTRACE_MODE_SPEC_IBPB (PTRACE_MODE_ATTACH_REALCREDS | PTRACE_MODE_IBPB) | ||
76 | 73 | ||
77 | /** | 74 | /** |
78 | * ptrace_may_access - check whether the caller is permitted to access | 75 | * ptrace_may_access - check whether the caller is permitted to access |
@@ -90,20 +87,6 @@ extern void exit_ptrace(struct task_struct *tracer, struct list_head *dead); | |||
90 | */ | 87 | */ |
91 | extern bool ptrace_may_access(struct task_struct *task, unsigned int mode); | 88 | extern bool ptrace_may_access(struct task_struct *task, unsigned int mode); |
92 | 89 | ||
93 | /** | ||
94 | * ptrace_may_access - check whether the caller is permitted to access | ||
95 | * a target task. | ||
96 | * @task: target task | ||
97 | * @mode: selects type of access and caller credentials | ||
98 | * | ||
99 | * Returns true on success, false on denial. | ||
100 | * | ||
101 | * Similar to ptrace_may_access(). Only to be called from context switch | ||
102 | * code. Does not call into audit and the regular LSM hooks due to locking | ||
103 | * constraints. | ||
104 | */ | ||
105 | extern bool ptrace_may_access_sched(struct task_struct *task, unsigned int mode); | ||
106 | |||
107 | static inline int ptrace_reparented(struct task_struct *child) | 90 | static inline int ptrace_reparented(struct task_struct *child) |
108 | { | 91 | { |
109 | return !same_thread_group(child->real_parent, child->parent); | 92 | return !same_thread_group(child->real_parent, child->parent); |