Update SECCOMP patch

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2019-06-24 19:01:53 +03:00
parent 5e0efa7c70
commit ecef7281d5
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB

View File

@ -1,17 +1,9 @@
From 939cdc6bb698412dffdc3011be9268ed3242b6d6 Mon Sep 17 00:00:00 2001
From 0cb0b507d7eaff090b2607799de3acad464fa446 Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <david.abdurachmanov@sifive.com>
Date: Mon, 24 Jun 2019 17:48:59 +0300
Date: Mon, 24 Jun 2019 18:58:45 +0300
Subject: [PATCH] riscv: add SECCOMP support
---
arch/riscv/Kconfig | 14 ++++++++++
arch/riscv/include/asm/seccomp.h | 10 +++++++
arch/riscv/include/asm/thread_info.h | 5 +++-
arch/riscv/kernel/entry.S | 27 +++++++++++++++++--
arch/riscv/kernel/ptrace.c | 10 +++++++
tools/testing/selftests/seccomp/seccomp_bpf.c | 8 +++++-
6 files changed, 70 insertions(+), 4 deletions(-)
create mode 100644 arch/riscv/include/asm/seccomp.h
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0c4b12205632..6f89a83c1e9c 100644
@ -62,7 +54,7 @@ index 000000000000..bf7744ee3b3d
+
+#endif /* _ASM_SECCOMP_H */
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index 905372d7eeb8..8c7585a4610c 100644
index 905372d7eeb8..a0b2a29a0da1 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -75,6 +75,7 @@ struct thread_info {
@ -84,7 +76,7 @@ index 905372d7eeb8..8c7585a4610c 100644
#define _TIF_SYSCALL_WORK \
- (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT)
+ (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT \
+ (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_SYSCALL_AUDIT | \
+ _TIF_SECCOMP )
#endif /* _ASM_RISCV_THREAD_INFO_H */