diff --git a/samples/Kconfig b/samples/Kconfig
index 559a58baff6ea5be2915ea6ed551a10c7adf3877..ccc50beaf17b8d664831849fced771c9996ecd76 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -85,4 +85,11 @@ config SAMPLE_CONNECTOR
 	  with it.
 	  See also Documentation/connector/connector.txt
 
+config SAMPLE_SECCOMP
+	tristate "Build seccomp sample code -- loadable modules only"
+	depends on SECCOMP_FILTER && m
+	help
+	  Build samples of seccomp filters using various methods of
+	  BPF filter construction.
+
 endif # SAMPLES
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
index 1b4e4b8f5e477de1d6e5fb6f172f5ad50d7402f6..ae7ff6f24f36ca41aa430e63c60768ba1553607f 100644
--- a/samples/seccomp/Makefile
+++ b/samples/seccomp/Makefile
@@ -1,7 +1,7 @@
 # kbuild trick to avoid linker error. Can be omitted if a module is built.
 obj- := dummy.o
 
-hostprogs-$(CONFIG_SECCOMP_FILTER) := bpf-fancy dropper bpf-direct
+hostprogs-$(CONFIG_SAMPLE_SECCOMP) := bpf-fancy dropper bpf-direct
 
 HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
 HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include