Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321643
b: refs/heads/master
c: c63cb46
h: refs/heads/master
i:
  321641: 9550574
  321639: a90ddbd
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Aug 8, 2012
1 parent c148ecc commit d1eed20
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 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: e206d3da58803de5cd38dc728f6da5221ec18ab0
refs/heads/master: c63cb468f373f479ff52b4a1b75f8ecdeaaf4f16
1 change: 1 addition & 0 deletions trunk/arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ config S390
select GENERIC_TIME_VSYSCALL
select GENERIC_CLOCKEVENTS
select KTIME_SCALAR if 32BIT
select HAVE_ARCH_SECCOMP_FILTER

config SCHED_OMIT_FRAME_POINTER
def_bool y
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/s390/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#ifndef _ASM_SYSCALL_H
#define _ASM_SYSCALL_H 1

#include <linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
#include <asm/ptrace.h>
Expand Down Expand Up @@ -87,4 +88,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
regs->orig_gpr2 = args[0];
}

static inline int syscall_get_arch(struct task_struct *task,
struct pt_regs *regs)
{
#ifdef CONFIG_COMPAT
if (test_tsk_thread_flag(task, TIF_31BIT))
return AUDIT_ARCH_S390;
#endif
return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390;
}
#endif /* _ASM_SYSCALL_H */
7 changes: 6 additions & 1 deletion trunk/arch/s390/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
long ret = 0;

/* Do the secure computing check first. */
secure_computing_strict(regs->gprs[2]);
if (secure_computing(regs->gprs[2])) {
/* seccomp failures shouldn't expose any additional code. */
ret = -1;
goto out;
}

/*
* The sysc_tracesys code in entry.S stored the system
Expand All @@ -745,6 +749,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
regs->gprs[2], regs->orig_gpr2,
regs->gprs[3], regs->gprs[4],
regs->gprs[5]);
out:
return ret ?: regs->gprs[2];
}

Expand Down

0 comments on commit d1eed20

Please sign in to comment.