Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107599
b: refs/heads/master
c: 9e5e211
h: refs/heads/master
i:
  107597: fcea30e
  107595: ec4e63f
  107591: ad64a25
  107583: 41b3519
v: v3
  • Loading branch information
Paul Mundt committed Aug 1, 2008
1 parent 9ad6ca0 commit c50fb20
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 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: ab99c733ae73cce31f2a2434f7099564e5a73d95
refs/heads/master: 9e5e21170e4de269cd5b9d53ac9d60d220e3be63
13 changes: 12 additions & 1 deletion trunk/arch/sh/kernel/ptrace_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
return ret;
}

static inline int audit_arch(void)
{
int arch = EM_SH;

#ifdef CONFIG_CPU_LITTLE_ENDIAN
arch |= __AUDIT_ARCH_LE;
#endif

return arch;
}

asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
{
long ret = 0;
Expand All @@ -233,7 +244,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
ret = -1L;

if (unlikely(current->audit_context))
audit_syscall_entry(AUDIT_ARCH_SH, regs->regs[3],
audit_syscall_entry(audit_arch(), regs->regs[3],
regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);

Expand Down
16 changes: 15 additions & 1 deletion trunk/arch/sh/kernel/ptrace_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,20 @@ asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
return sys_ptrace(request, pid, addr, data);
}

static inline int audit_arch(void)
{
int arch = EM_SH;

#ifdef CONFIG_64BIT
arch |= __AUDIT_ARCH_64BIT;
#endif
#ifdef CONFIG_CPU_LITTLE_ENDIAN
arch |= __AUDIT_ARCH_LE;
#endif

return arch;
}

asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
{
long long ret = 0;
Expand All @@ -238,7 +252,7 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
ret = -1LL;

if (unlikely(current->audit_context))
audit_syscall_entry(AUDIT_ARCH_SH, regs->regs[1],
audit_syscall_entry(audit_arch(), regs->regs[1],
regs->regs[2], regs->regs[3],
regs->regs[4], regs->regs[5]);

Expand Down

0 comments on commit c50fb20

Please sign in to comment.