diff options
author | Helge Deller <deller@gmx.de> | 2014-08-27 08:39:56 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2014-08-27 08:39:56 -0400 |
commit | c90f06943e05519a87140dc407cf589c220aeedf (patch) | |
tree | e2ae9c471881462dba751849fc1ea0a53dc36168 /arch/parisc/kernel | |
parent | 3335f75a8877ac50f27510cda1368108bca0f151 (diff) |
parisc: Wire up seccomp, getrandom and memfd_create syscalls
With secure computing we only support the SECCOMP_MODE_STRICT mode for
now.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index e842ee233db4..3bab72462ab5 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -270,6 +270,12 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
270 | { | 270 | { |
271 | long ret = 0; | 271 | long ret = 0; |
272 | 272 | ||
273 | /* Do the secure computing check first. */ | ||
274 | if (secure_computing(regs->gr[20])) { | ||
275 | /* seccomp failures shouldn't expose any additional code. */ | ||
276 | return -1; | ||
277 | } | ||
278 | |||
273 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 279 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
274 | tracehook_report_syscall_entry(regs)) | 280 | tracehook_report_syscall_entry(regs)) |
275 | ret = -1L; | 281 | ret = -1L; |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 84c5d3a58fa1..b563d9c8268b 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -433,6 +433,9 @@ | |||
433 | ENTRY_SAME(sched_getattr) /* 335 */ | 433 | ENTRY_SAME(sched_getattr) /* 335 */ |
434 | ENTRY_COMP(utimes) | 434 | ENTRY_COMP(utimes) |
435 | ENTRY_SAME(renameat2) | 435 | ENTRY_SAME(renameat2) |
436 | ENTRY_SAME(seccomp) | ||
437 | ENTRY_SAME(getrandom) | ||
438 | ENTRY_SAME(memfd_create) /* 340 */ | ||
436 | 439 | ||
437 | /* Nothing yet */ | 440 | /* Nothing yet */ |
438 | 441 | ||