mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
Mark ptrace_{traceme,attach,detach} static
They are only used inside kernel/ptrace.c, and have been for a long time. We don't want to go back to the bad-old-days when architectures did things on their own, so make them static and private. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b65a0e0c84
commit
e3e89cc535
@ -102,11 +102,8 @@
|
|||||||
|
|
||||||
extern long arch_ptrace(struct task_struct *child, long request,
|
extern long arch_ptrace(struct task_struct *child, long request,
|
||||||
unsigned long addr, unsigned long data);
|
unsigned long addr, unsigned long data);
|
||||||
extern int ptrace_traceme(void);
|
|
||||||
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
|
extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
|
||||||
extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
|
extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
|
||||||
extern int ptrace_attach(struct task_struct *tsk);
|
|
||||||
extern int ptrace_detach(struct task_struct *, unsigned int);
|
|
||||||
extern void ptrace_disable(struct task_struct *);
|
extern void ptrace_disable(struct task_struct *);
|
||||||
extern int ptrace_check_attach(struct task_struct *task, int kill);
|
extern int ptrace_check_attach(struct task_struct *task, int kill);
|
||||||
extern int ptrace_request(struct task_struct *child, long request,
|
extern int ptrace_request(struct task_struct *child, long request,
|
||||||
|
@ -163,7 +163,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
|
|||||||
return !err;
|
return !err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ptrace_attach(struct task_struct *task)
|
static int ptrace_attach(struct task_struct *task)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ int ptrace_attach(struct task_struct *task)
|
|||||||
* Performs checks and sets PT_PTRACED.
|
* Performs checks and sets PT_PTRACED.
|
||||||
* Should be used by all ptrace implementations for PTRACE_TRACEME.
|
* Should be used by all ptrace implementations for PTRACE_TRACEME.
|
||||||
*/
|
*/
|
||||||
int ptrace_traceme(void)
|
static int ptrace_traceme(void)
|
||||||
{
|
{
|
||||||
int ret = -EPERM;
|
int ret = -EPERM;
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ptrace_detach(struct task_struct *child, unsigned int data)
|
static int ptrace_detach(struct task_struct *child, unsigned int data)
|
||||||
{
|
{
|
||||||
bool dead = false;
|
bool dead = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user