Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333652
b: refs/heads/master
c: d878d6d
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Oct 1, 2012
1 parent c209564 commit 87ad8cd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 533e6903bea0440816a0f517b0845ccea4cc7917
refs/heads/master: d878d6dacee2c862f02da20f7fa3e2c0e8820e71
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ struct switch_stack {
#define user_mode(regs) (!((regs)->sr & PS_S))
#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
#define current_pt_regs() \
(struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1

#define arch_has_single_step() (1)

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_EXECVE
#define __ARCH_WANT_KERNEL_EXECVE

/*
* "Conditional" syscalls
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/m68k/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ ENTRY(ret_from_kernel_thread)
movel %d0,(%sp)
jra sys_exit

ENTRY(ret_from_kernel_execve)
movel 4(%sp), %sp
GET_CURRENT(%d0)
jra ret_from_exception

#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)

#ifdef TRAP_DBG_INTERRUPT
Expand Down
20 changes: 0 additions & 20 deletions trunk/arch/m68k/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,26 +298,6 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
EXPORT_SYMBOL(dump_fpu);
#endif /* CONFIG_FPU */

/*
* sys_execve() executes a new program.
*/
asmlinkage int sys_execve(const char __user *name,
const char __user *const __user *argv,
const char __user *const __user *envp)
{
int error;
char * filename;
struct pt_regs *regs = (struct pt_regs *) &name;

filename = getname(name);
error = PTR_ERR(filename);
if (IS_ERR(filename))
return error;
error = do_execve(filename, argv, envp, regs);
putname(filename);
return error;
}

unsigned long get_wchan(struct task_struct *p)
{
unsigned long fp, pc;
Expand Down
17 changes: 0 additions & 17 deletions trunk/arch/m68k/kernel/sys_m68k.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,23 +549,6 @@ asmlinkage int sys_getpagesize(void)
return PAGE_SIZE;
}

/*
* Do a system call from kernel instead of calling sys_execve so we
* end up with proper pt_regs.
*/
int kernel_execve(const char *filename,
const char *const argv[],
const char *const envp[])
{
register long __res asm ("%d0") = __NR_execve;
register long __a asm ("%d1") = (long)(filename);
register long __b asm ("%d2") = (long)(argv);
register long __c asm ("%d3") = (long)(envp);
asm volatile ("trap #0" : "+d" (__res)
: "d" (__a), "d" (__b), "d" (__c));
return __res;
}

asmlinkage unsigned long sys_get_thread_area(void)
{
return current_thread_info()->tp_value;
Expand Down

0 comments on commit 87ad8cd

Please sign in to comment.