summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMickaël Salaün <mic@digikod.net>2026-11-18 15:52:08 +0100
committerMickaël Salaün <mic@digikod.net>2026-11-19 11:55:30 +0100
commita338ad4cc5b95e53f3e49c434235c09732740dbe (patch)
tree1d99aad51c219e2cbad8f56abe83f802fae0c76b /tools/perf/scripts/python
parent6b8fc8ab1801660b0441e5cc19a14d61f38df921 (diff)
landlock: Mediate CAP_SYS_ADMIN for the admin memory reserve
With vm.overcommit_memory=2, __vm_enough_memory() keeps the admin reserve for callers with CAP_SYS_ADMIN, which cap_vm_enough_memory() checks with cap_capable(), so a domain denying CAP_SYS_ADMIN cannot withhold this reserve, meant for an administrator to recover from memory exhaustion. Add a Landlock vm_enough_memory hook that withholds the reserve when the domain denies CAP_SYS_ADMIN. Like commoncap and SELinux, do not audit this check: it runs for every accounted mapping and only selects a limit. Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Cc: Serge Hallyn <serge@hallyn.com> Acked-by: Serge Hallyn (AMD) <sergeh@kernel.org> Reviewed-by: Günther Noack <gnoack@google.com> Fixes: 97c8386f1d74 ("landlock: Enforce capability restrictions") Link: https://patch.msgid.link/20261118145217.2551053-5-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions