History

seccomp: Introduce SECCOMP_RET_KILL_PROCESS

This introduces the BPF return value for SECCOMP_RET_KILL_PROCESS to kill an entire process. This cannot yet be reached by seccomp, but it changes the default-kill behavior (for unknown return values) from kill-thread to kill-process.

Kees Cook committed 9 years ago

Commit 4d3b0b01 parent fd768752 files · +26 −14Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/seccomp.h+10−8
@@ -22,18 +22,20 @@ · 21 unmodified lines
22/*22/*
23 * All BPF programs must return a 32-bit value.23 * All BPF programs must return a 32-bit value.
24 * The bottom 16-bits are for optional return data.24 * The bottom 16-bits are for optional return data.
25 * The upper 16-bits are ordered from least permissive values to most.25 * The upper 16-bits are ordered from least permissive values to most,
26 * as a signed value (so 0x8000000 is negative).
26 *27 *
27 * The ordering ensures that a min_t() over composed return values always28 * The ordering ensures that a min_t() over composed return values always
28 * selects the least permissive choice.29 * selects the least permissive choice.
29 */30 */
30#define SECCOMP_RET_KILL_THREAD 0x00000000U /* kill the thread */31#define SECCOMP_RET_KILL_PROCESS 0x80000000U /* kill the process */
31#define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD32#define SECCOMP_RET_KILL_THREAD 0x00000000U /* kill the thread */
32#define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */33#define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD
33#define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */34#define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */
34#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */35#define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */
35#define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */36#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */
36#define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */37#define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */
38#define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */
37 39
38/* Masks for the return value sections. */40/* Masks for the return value sections. */
39#define SECCOMP_RET_ACTION 0x7fff0000U41#define SECCOMP_RET_ACTION 0x7fff0000U

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t