Skip to content

Commit

Permalink
remove __ARCH_WANT_COMPAT_SYS_PTRACE
Browse files Browse the repository at this point in the history
All architectures now use the generic compat_sys_ptrace, as should every
new architecture that needs 32bit compat (if we'll ever get another).

Remove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also
kill a comment about __ARCH_SYS_PTRACE that was added after
__ARCH_SYS_PTRACE was already gone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Nov 30, 2008
1 parent 16799c6 commit 96b8936
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 22 deletions.
2 changes: 0 additions & 2 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ config HAVE_KRETPROBES
# task_pt_regs() in asm/processor.h or asm/ptrace.h
# arch_has_single_step() if there is hardware single-step support
# arch_has_block_step() if there is hardware block-step support
# arch_ptrace() and not #define __ARCH_SYS_PTRACE
# compat_arch_ptrace() and #define __ARCH_WANT_COMPAT_SYS_PTRACE
# asm/syscall.h supplying asm-generic/syscall.h interface
# linux/regset.h user_regset interfaces
# CORE_DUMP_USE_REGSET #define'd in linux/elf.h
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs)
#define arch_has_block_step() (1)
extern void user_enable_block_step(struct task_struct *);

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#endif /* !__KERNEL__ */

/* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */
Expand Down
4 changes: 0 additions & 4 deletions arch/mips/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
#ifndef _ASM_PTRACE_H
#define _ASM_PTRACE_H

#ifdef CONFIG_64BIT
#define __ARCH_WANT_COMPAT_SYS_PTRACE
#endif

/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
#define FPR_BASE 32
#define PC 64
Expand Down
2 changes: 0 additions & 2 deletions arch/parisc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ struct pt_regs {

#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))

#define __ARCH_WANT_COMPAT_SYS_PTRACE

struct task_struct;
#define arch_has_single_step() 1
void user_disable_single_step(struct task_struct *task);
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ struct pt_regs {

#ifdef __powerpc64__

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */
#define STACK_FRAME_LR_SAVE 2 /* Location of LR in stack frame */
#define STACK_FRAME_REGS_MARKER ASM_CONST(0x7265677368657265)
Expand Down
2 changes: 0 additions & 2 deletions arch/s390/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,6 @@ struct task_struct;
extern void user_enable_single_step(struct task_struct *);
extern void user_disable_single_step(struct task_struct *);

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
#define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
#define user_stack_pointer(regs)((regs)->gprs[15])
Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/include/asm/ptrace_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ struct global_reg_snapshot {
};
extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#define force_successful_syscall_return() \
do { current_thread_info()->syscall_noerror = 1; \
} while (0)
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ extern int do_get_thread_area(struct task_struct *p, int idx,
extern int do_set_thread_area(struct task_struct *p, int idx,
struct user_desc __user *info, int can_allocate);

#define __ARCH_WANT_COMPAT_SYS_PTRACE

#endif /* __KERNEL__ */

#endif /* !__ASSEMBLY__ */
Expand Down
2 changes: 0 additions & 2 deletions include/linux/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,10 @@ extern int compat_ptrace_request(struct task_struct *child,
compat_long_t request,
compat_ulong_t addr, compat_ulong_t data);

#ifdef __ARCH_WANT_COMPAT_SYS_PTRACE
extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
compat_ulong_t addr, compat_ulong_t data);
asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
compat_long_t addr, compat_long_t data);
#endif /* __ARCH_WANT_COMPAT_SYS_PTRACE */

/*
* epoll (fs/eventpoll.c) compat bits follow ...
Expand Down
4 changes: 2 additions & 2 deletions kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
return (copied == sizeof(data)) ? 0 : -EIO;
}

#if defined CONFIG_COMPAT && defined __ARCH_WANT_COMPAT_SYS_PTRACE
#if defined CONFIG_COMPAT
#include <linux/compat.h>

int compat_ptrace_request(struct task_struct *child, compat_long_t request,
Expand Down Expand Up @@ -709,4 +709,4 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
unlock_kernel();
return ret;
}
#endif /* CONFIG_COMPAT && __ARCH_WANT_COMPAT_SYS_PTRACE */
#endif /* CONFIG_COMPAT */

0 comments on commit 96b8936

Please sign in to comment.