]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add bpf_bprm_opts_set helper
authorKP Singh <kpsingh@google.com>
Tue, 17 Nov 2020 23:29:28 +0000 (23:29 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Nov 2020 00:36:27 +0000 (01:36 +0100)
commit61db6b0d6088eefa766ae15e1339355ecf710f75
treed4552b1b12239b67d9a7a78cd6e0af42a3c3f79b
parentc216d1bf7cfc8cb83e9ab4fd702691bbec67a988
bpf: Add bpf_bprm_opts_set helper

The helper allows modification of certain bits on the linux_binprm
struct starting with the secureexec bit which can be updated using the
BPF_F_BPRM_SECUREEXEC flag.

secureexec can be set by the LSM for privilege gaining executions to set
the AT_SECURE auxv for glibc.  When set, the dynamic linker disables the
use of certain environment variables (like LD_PRELOAD).

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201117232929.2156341-1-kpsingh@chromium.org
include/uapi/linux/bpf.h
kernel/bpf/bpf_lsm.c
scripts/bpf_helpers_doc.py
tools/include/uapi/linux/bpf.h