Skip to contentSkip to conversation

: mark ptrace_traceme static

PATCH In review Christoph Hellwig 3 participants 5 messages Feb 1, 2010 – Apr 28, 2010 ptrace support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 : mark ptrace_traceme static

It's not used outside of ptrace.c, so no need to allow access to it.

include/linux/ptrace.h +0 -1
Index: linux-2.6/include/linux/ptrace.h
===================================================================
@@ -81,7 +81,6 @@
 
 
 extern long arch_ptrace(struct task_struct *child, long request, long addr, 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_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
 extern int ptrace_attach(struct task_struct *tsk);
kernel/ptrace.c +1 -1
Index: linux-2.6/kernel/ptrace.c
===================================================================
@@ -220,7 +220,7 @@ out:
  * Performs checks and sets PT_PTRACED.
  * Should be used by all ptrace implementations for PTRACE_TRACEME.
  */
-int ptrace_traceme(void)
+static int ptrace_traceme(void)
 {
 	int ret = -EPERM;
 
#2 lore raw
In reply to Christoph Hellwig

Any reason this never made it to Linus?

Quoted 21 lines · Christoph Hellwig

It's not used outside of ptrace.c, so no need to allow access to it.

Index: linux-2.6/include/linux/ptrace.h
===================================================================

include/linux/ptrace.h +0 -1
@@ -81,7 +81,6 @@
 
 
 extern long arch_ptrace(struct task_struct *child, long request, long addr, 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_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
 extern int ptrace_attach(struct task_struct *tsk);

Index: linux-2.6/kernel/ptrace.c
===================================================================

kernel/ptrace.c out: · line 226

Quoted 8 lines
kernel/ptrace.c +1 -1
@@ -220,7 +220,7 @@ out:
  * Performs checks and sets PT_PTRACED.
  * Should be used by all ptrace implementations for PTRACE_TRACEME.
  */
-int ptrace_traceme(void)
+static int ptrace_traceme(void)
 {
 	int ret = -EPERM;
 

---end quoted text---

maintainer
#3 lore raw
Quoted 2 lines · Christoph Hellwig

Any reason this never made it to Linus?

The patch is obviously fine, and iirc it was explicitly acked by Roland.

Probably you can resend it to Andrew?

Quoted 31 lines · Christoph Hellwig
Quoted 21 lines

It's not used outside of ptrace.c, so no need to allow access to it.

Index: linux-2.6/include/linux/ptrace.h
===================================================================

include/linux/ptrace.h +0 -1
@@ -81,7 +81,6 @@
 
 
 extern long arch_ptrace(struct task_struct *child, long request, long addr, 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_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
 extern int ptrace_attach(struct task_struct *tsk);

Index: linux-2.6/kernel/ptrace.c
===================================================================

kernel/ptrace.c out: · line 226

Quoted 8 lines
kernel/ptrace.c +1 -1
@@ -220,7 +220,7 @@ out:
  * Performs checks and sets PT_PTRACED.
  * Should be used by all ptrace implementations for PTRACE_TRACEME.
  */
-int ptrace_traceme(void)
+static int ptrace_traceme(void)
 {
 	int ret = -EPERM;
 

---end quoted text---

#4 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines

Any reason this never made it to Linus?

The patch is obviously fine, and iirc it was explicitly acked by Roland.

Yup. We don't have any canonical tree or submission forwarding path that goes through us for ptrace stuff, we just post the ACKs. If Andrew/Linus et al want us to, we can keep a tree of ptrace-related patches on the queue to go in. But we haven't heretofore.

Thanks,
Roland