mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 15:24:32 +08:00
e1199815b4
Test all Landlock system calls, ptrace hooks semantic and filesystem access-control with multiple layouts. Test coverage for security/landlock/ is 93.6% of lines. The code not covered only deals with internal kernel errors (e.g. memory allocation) and race conditions. Cc: James Morris <jmorris@namei.org> Cc: Jann Horn <jannh@google.com> Cc: Serge E. Hallyn <serge@hallyn.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com> Reviewed-by: Vincent Dagonneau <vincent.dagonneau@ssi.gouv.fr> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210422154123.13086-11-mic@digikod.net Signed-off-by: James Morris <jamorris@linux.microsoft.com>
25 lines
501 B
Makefile
25 lines
501 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
CFLAGS += -Wall -O2
|
|
|
|
src_test := $(wildcard *_test.c)
|
|
|
|
TEST_GEN_PROGS := $(src_test:.c=)
|
|
|
|
TEST_GEN_PROGS_EXTENDED := true
|
|
|
|
KSFT_KHDR_INSTALL := 1
|
|
OVERRIDE_TARGETS := 1
|
|
include ../lib.mk
|
|
|
|
khdr_dir = $(top_srcdir)/usr/include
|
|
|
|
$(khdr_dir)/linux/landlock.h: khdr
|
|
@:
|
|
|
|
$(OUTPUT)/true: true.c
|
|
$(LINK.c) $< $(LDLIBS) -o $@ -static
|
|
|
|
$(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h ../kselftest_harness.h common.h
|
|
$(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir)
|