Kconfig 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config SECURITY_LOADPIN
  3. bool "Pin load of kernel files (modules, fw, etc) to one filesystem"
  4. depends on SECURITY && BLOCK
  5. help
  6. Any files read through the kernel file reading interface
  7. (kernel modules, firmware, kexec images, security policy)
  8. can be pinned to the first filesystem used for loading. When
  9. enabled, any files that come from other filesystems will be
  10. rejected. This is best used on systems without an initrd that
  11. have a root filesystem backed by a read-only device such as
  12. dm-verity or a CDROM.
  13. config SECURITY_LOADPIN_ENFORCE
  14. bool "Enforce LoadPin at boot"
  15. depends on SECURITY_LOADPIN
  16. # Module compression breaks LoadPin unless modules are decompressed in
  17. # the kernel.
  18. depends on !MODULE_COMPRESS || MODULE_DECOMPRESS
  19. help
  20. If selected, LoadPin will enforce pinning at boot. If not
  21. selected, it can be enabled at boot with the kernel parameter
  22. "loadpin.enforce=1".
  23. config SECURITY_LOADPIN_VERITY
  24. bool "Allow reading files from certain other filesystems that use dm-verity"
  25. depends on SECURITY_LOADPIN && DM_VERITY=y && SECURITYFS
  26. help
  27. If selected LoadPin can allow reading files from filesystems
  28. that use dm-verity. LoadPin maintains a list of verity root
  29. digests it considers trusted. A verity backed filesystem is
  30. considered trusted if its root digest is found in the list
  31. of trusted digests.
  32. The list of trusted verity can be populated through an ioctl
  33. on the LoadPin securityfs entry 'dm-verity'. The ioctl
  34. expects a file descriptor of a file with verity digests as
  35. parameter. The file must be located on the pinned root and
  36. start with the line:
  37. # LOADPIN_TRUSTED_VERITY_ROOT_DIGESTS
  38. This is followed by the verity digests, with one digest per
  39. line.