Skip to content

eBPF-based security platform

build: require syscall exit tracepoints

John Fastabend9d07f7a91801
diff --git a/Documentation/requirements.rst b/Documentation/requirements.rst
index 85ef27a5..b2402dbd 100644
--- a/Documentation/requirements.rst
+++ b/Documentation/requirements.rst
@@ -56,6 +56,11 @@ fixture.
``ENOTSUPP``. Either way ``shirudo init`` cannot attach its
enforcement. The same trampolines later carry ``fentry``,
``fexit``, ``fmod_ret`` and ``lsm`` upatches at no extra cost.
+ * - ``CONFIG_FTRACE_SYSCALLS``
+ - Provides the ``syscalls/sys_exit_prctl`` tracepoint used by
+ shirudo's ``PR_SET_MM`` identity guard. Without it,
+ ``shirudo init`` cannot attach the cleanup hook and does not
+ complete.
* - ``CONFIG_SECURITYFS``
- ``/sys/kernel/security/lsm``, which the pre-flight reads to
confirm the BPF LSM is active (``bpf_lsm_active``).
diff --git a/contrib/build-kernel-package.sh b/contrib/build-kernel-package.sh
index 4359d6ca..9c301434 100755
--- a/contrib/build-kernel-package.sh
+++ b/contrib/build-kernel-package.sh
@@ -354,6 +354,7 @@ CONFIG_UPROBE_EVENTS=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_BPF=y
CONFIG_FTRACE=y
+CONFIG_FTRACE_SYSCALLS=y
CONFIG_FUNCTION_TRACER=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
@@ -495,6 +496,7 @@ require_config CONFIG_BPF_LSM y
require_config CONFIG_BPF_SYSCALL y
require_config CONFIG_BPF_JIT y
require_config CONFIG_CGROUP_BPF y
+require_config CONFIG_FTRACE_SYSCALLS y
require_config CONFIG_FUNCTION_TRACER y
require_config CONFIG_DYNAMIC_FTRACE y
require_config CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS y