Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713502 > unrolled thread

[PATCH] samples: Unrename SECCOMP_RET_KILL

Started byKees Cook <keescook@chromium.org>
First post2017-08-17 05:40 +0200
Last post2017-08-17 06:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] samples: Unrename SECCOMP_RET_KILL Kees Cook <keescook@chromium.org> - 2017-08-17 05:40 +0200
    Re: [PATCH] samples: Unrename SECCOMP_RET_KILL James Morris <jmorris@namei.org> - 2017-08-17 06:30 +0200

#1713502 — [PATCH] samples: Unrename SECCOMP_RET_KILL

FromKees Cook <keescook@chromium.org>
Date2017-08-17 05:40 +0200
Subject[PATCH] samples: Unrename SECCOMP_RET_KILL
Message-ID<ufjP3-7vK-11@gated-at.bofh.it>
Since samples can still be built before header installs, avoid the
cosmetic renaming of SECCOMP_RET_KILL to avoid build failures in -next.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
Hi James, this should fix the samples build failure seen during -next
cross compiles.
---
 samples/seccomp/bpf-direct.c | 4 ++--
 samples/seccomp/bpf-helper.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/samples/seccomp/bpf-direct.c b/samples/seccomp/bpf-direct.c
index 235ce3c49ee9..151ec3f52189 100644
--- a/samples/seccomp/bpf-direct.c
+++ b/samples/seccomp/bpf-direct.c
@@ -129,7 +129,7 @@ static int install_filter(void)
 		/* Check that read is only using stdin. */
 		BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)),
 		BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, STDIN_FILENO, 4, 0),
-		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD),
+		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
 
 		/* Check that write is only using stdout */
 		BPF_STMT(BPF_LD+BPF_W+BPF_ABS, syscall_arg(0)),
@@ -139,7 +139,7 @@ static int install_filter(void)
 
 		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW),
 		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_TRAP),
-		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD),
+		BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),
 	};
 	struct sock_fprog prog = {
 		.len = (unsigned short)(sizeof(filter)/sizeof(filter[0])),
diff --git a/samples/seccomp/bpf-helper.h b/samples/seccomp/bpf-helper.h
index 83dbe79cbe2c..1d8de9edd858 100644
--- a/samples/seccomp/bpf-helper.h
+++ b/samples/seccomp/bpf-helper.h
@@ -44,7 +44,7 @@ void seccomp_bpf_print(struct sock_filter *filter, size_t count);
 #define ALLOW \
 	BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)
 #define DENY \
-	BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL_THREAD)
+	BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL)
 #define JUMP(labels, label) \
 	BPF_JUMP(BPF_JMP+BPF_JA, FIND_LABEL((labels), (label)), \
 		 JUMP_JT, JUMP_JF)
-- 
2.7.4


-- 
Kees Cook
Pixel Security

[toc] | [next] | [standalone]


#1713528

FromJames Morris <jmorris@namei.org>
Date2017-08-17 06:30 +0200
Message-ID<ufkBr-85g-5@gated-at.bofh.it>
In reply to#1713502
On Wed, 16 Aug 2017, Kees Cook wrote:

> Since samples can still be built before header installs, avoid the
> cosmetic renaming of SECCOMP_RET_KILL to avoid build failures in -next.
> 
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> Hi James, this should fix the samples build failure seen during -next
> cross compiles.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next

-- 
James Morris
<jmorris@namei.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web