|author||Olof Johansson <firstname.lastname@example.org>||2016-07-05 23:53:19 -0700|
|committer||Kees Cook <email@example.com>||2016-07-07 10:58:03 -0700|
|parent||Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/selinux into next (diff)|
samples/seccomp: Add standalone config option
Add a separate Kconfig option for SAMPLES_SECCOMP. Main reason for this is that, just like other samples, it's forced to be a module. Without this, since the sample is a target only controlled by CONFIG_SECCOMP_FILTER, the samples will be built before include files are put in place properly. For example, from an arm64 allmodconfig built with "make -sk -j 32" (without specific target), the following happens: samples/seccomp/bpf-fancy.c:13:27: fatal error: linux/seccomp.h: No such file or directory samples/seccomp/bpf-helper.h:20:50: fatal error: linux/seccomp.h: No such file or directory samples/seccomp/dropper.c:20:27: fatal error: linux/seccomp.h: No such file or directory samples/seccomp/bpf-direct.c:21:27: fatal error: linux/seccomp.h: No such file or directory So, just stick to the same format as other samples. Signed-off-by: Olof Johansson <firstname.lastname@example.org> Signed-off-by: Kees Cook <email@example.com>
Diffstat (limited to 'samples/Kconfig')
1 files changed, 7 insertions, 0 deletions
diff --git a/samples/Kconfig b/samples/Kconfig
index 559a58baff6e..ccc50beaf17b 100644
@@ -85,4 +85,11 @@ config SAMPLE_CONNECTOR
See also Documentation/connector/connector.txt
+ tristate "Build seccomp sample code -- loadable modules only"
+ depends on SECCOMP_FILTER && m
+ Build samples of seccomp filters using various methods of
+ BPF filter construction.
endif # SAMPLES