diff options
author | KP Singh | 2020-03-29 01:43:55 +0100 |
---|---|---|
committer | Daniel Borkmann | 2020-03-30 01:35:11 +0200 |
commit | 03e54f100d5756f8403fffd60aed8e883ea864c0 (patch) | |
tree | 2f0420f59340c4135cdbad9893de20dd66f24666 /Kbuild | |
parent | 1e092a0318292637cde832868016f37e942eed24 (diff) |
bpf: lsm: Add selftests for BPF_PROG_TYPE_LSM
* Load/attach a BPF program that hooks to file_mprotect (int)
and bprm_committed_creds (void).
* Perform an action that triggers the hook.
* Verify if the audit event was received using the shared global
variables for the process executed.
* Verify if the mprotect returns a -EPERM.
Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Florent Revest <revest@google.com>
Reviewed-by: Thomas Garnier <thgarnie@google.com>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200329004356.27286-8-kpsingh@chromium.org
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions