Home
last modified time | relevance | path

Searched refs:seccomp (Results 1 – 25 of 65) sorted by relevance

123

/linux-6.6.21/Documentation/translations/zh_CN/userspace-api/
Dseccomp_filter.rst29 此外,BPF让seccomp用户不再成为在系统调用干预框架(system call interposition
45 添加了一个额外的seccomp模式,它可以使用和严格seccomp相同的 prctl(2) 调用来启用。
76 一个seccomp过滤器可能返回下列任意值。如果多个过滤器存在,评估一个指定系统调用的
100seccomp触发的 ``SIGSYS`` 会有一个 ``SYS_SECCOMP`` 的 si_code 。
121 在追踪器被通知后,seccomp检查不会再次运行。(这意味着基于seccomp的沙箱必须禁止
149 ``samples/seccomp/`` 文件夹包含了x86专用和更通用的使用高层宏接口来生成BPF程序的
155 ``SECCOMP_RET_USER_NOTIF`` 返回值会让seccomp过滤器传递一个特定的系统调用给用户
159 传递 ``SECCOMP_FILTER_FLAG_NEW_LISTENER`` 参数给 ``seccomp()`` 系统调用可以取
164 fd = seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FILTER_FLAG_NEW_LISTENER, &prog);
171 seccomp通知文件描述符由两个结构体组成:
[all …]
Dno_new_privs.rst46 - 为seccomp模式2沙箱安装的过滤器会跨execve持久化,并能够改变新执行程序的行为。
/linux-6.6.21/include/linux/
Dseccomp.h37 struct seccomp { struct
58 static inline int seccomp_mode(struct seccomp *s) in seccomp_mode() argument
67 struct seccomp { }; struct
88 static inline int seccomp_mode(struct seccomp *s) in seccomp_mode()
/linux-6.6.21/kernel/
Dseccomp.c412 READ_ONCE(current->seccomp.filter); in seccomp_run_filters()
441 if (current->seccomp.mode && current->seccomp.mode != seccomp_mode) in seccomp_may_assign_mode()
455 task->seccomp.mode = seccomp_mode; in seccomp_assign_mode()
506 if (thread->seccomp.mode == SECCOMP_MODE_DISABLED || in seccomp_can_sync_threads()
507 (thread->seccomp.mode == SECCOMP_MODE_FILTER && in seccomp_can_sync_threads()
508 is_ancestor(thread->seccomp.filter, in seccomp_can_sync_threads()
509 caller->seccomp.filter))) in seccomp_can_sync_threads()
571 struct seccomp_filter *orig = tsk->seccomp.filter; in seccomp_filter_release()
577 tsk->seccomp.filter = NULL; in seccomp_filter_release()
613 __seccomp_filter_release(thread->seccomp.filter); in seccomp_sync_threads()
[all …]
Dptrace.c382 if (seccomp_mode(&current->seccomp) != SECCOMP_MODE_DISABLED || in check_ptrace_options()
967 info->seccomp.ret_data = child->ptrace_message; in ptrace_get_syscall_info_seccomp()
970 return offsetofend(struct ptrace_syscall_info, seccomp.ret_data); in ptrace_get_syscall_info_seccomp()
DMakefile96 obj-$(CONFIG_SECCOMP) += seccomp.o
Dsys_ni.c243 COND_SYSCALL(seccomp);
/linux-6.6.21/Documentation/userspace-api/
Dseccomp_filter.rst24 Additionally, BPF makes it impossible for users of seccomp to fall prey
46 An additional seccomp mode is added and is enabled using the same
47 prctl(2) call as the strict seccomp. If the architecture has
87 A seccomp filter may return any of the following values. If multiple
119 ``SIGSYS`` triggered by seccomp will have a si_code of ``SYS_SECCOMP``.
149 The seccomp check will not be run again after the tracer is
150 notified. (This means that seccomp-based sandboxes MUST NOT
187 The ``samples/seccomp/`` directory contains both an x86-specific example
194 The ``SECCOMP_RET_USER_NOTIF`` return code lets seccomp filters pass a
200 argument to the ``seccomp()`` syscall:
[all …]
Dno_new_privs.rst47 - Filters installed for the seccomp mode 2 sandbox persist across
/linux-6.6.21/Documentation/features/seccomp/seccomp-filter/
Darch-support.txt2 # Feature name: seccomp-filter
4 # description: arch supports seccomp filters
/linux-6.6.21/tools/testing/selftests/seccomp/
Dseccomp_bpf.c282 #ifndef seccomp
283 int seccomp(unsigned int op, unsigned int flags, void *args) in seccomp() function
835 ASSERT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, 0, in kill_thread_or_group()
844 ASSERT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog_thread)); in kill_thread_or_group()
2123 FIXTURE_VARIANT_ADD(TRACE_syscall, seccomp) { in FIXTURE_VARIANT_ADD() argument
2322 ret = seccomp(-1, 0, &prog); in TEST()
2331 ret = seccomp(SECCOMP_SET_MODE_STRICT, -1, NULL); in TEST()
2335 ret = seccomp(SECCOMP_SET_MODE_STRICT, 0, &prog); in TEST()
2341 ret = seccomp(SECCOMP_SET_MODE_FILTER, -1, &prog); in TEST()
2345 ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, NULL); in TEST()
[all …]
/linux-6.6.21/samples/seccomp/
Duser-trap.c26 static int seccomp(unsigned int op, unsigned int flags, void *args) in seccomp() function
101 return seccomp(SECCOMP_SET_MODE_FILTER, flags, &prog); in user_trap_syscall()
293 if (seccomp(SECCOMP_GET_NOTIF_SIZES, 0, &sizes) < 0) { in main()
/linux-6.6.21/tools/perf/bench/
Dsched-seccomp-notify.c44 static int seccomp(unsigned int op, unsigned int flags, void *args) in seccomp() function
64 return seccomp(SECCOMP_SET_MODE_FILTER, flags, &prog); in user_notif_syscall()
DBuild3 perf-y += sched-seccomp-notify.o
/linux-6.6.21/samples/
DMakefile20 subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp
DKconfig177 bool "Build seccomp sample code"
180 Build samples of seccomp filters using various methods of
/linux-6.6.21/rust/
Dbindgen_parameters21 # `seccomp`'s comment gets understood as a doctest
/linux-6.6.21/include/uapi/linux/
Dptrace.h101 } seccomp; member
/linux-6.6.21/arch/mips/kernel/
Dscall64-n32.S78 bltz v0, 1f # seccomp failed? Skip syscall
Dscall64-n64.S88 bltz v0, 1f # seccomp failed? Skip syscall
Dscall32-o32.S128 bltz v0, 1f # seccomp failed? Skip syscall
Dscall64-o32.S133 bltz v0, 1f # seccomp failed? Skip syscall
/linux-6.6.21/arch/
DKconfig546 An arch should select this symbol to support seccomp mode 1 (the fixed
548 and compat syscalls if the asm-generic/seccomp.h defaults need adjustment:
568 - seccomp syscall wired up
574 prompt "Enable seccomp to safely execute untrusted bytecode"
583 own address space using seccomp. Once seccomp is enabled via
584 prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be
586 syscalls defined by each seccomp mode.
601 bool "Show seccomp filter cache status in /proc/pid/seccomp_cache"
606 seccomp cache data. The file format is subject to change. Reading
610 an adversary may be able to infer the seccomp filter logic.
/linux-6.6.21/init/
Dinit_task.c211 .seccomp = { .filter_count = ATOMIC_INIT(0) },
/linux-6.6.21/tools/testing/selftests/
DMakefile76 TARGETS += seccomp

123