Kconfig 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # SPDX-License-Identifier: GPL-2.0
  2. config FS_VERITY
  3. bool "FS Verity (read-only file-based authenticity protection)"
  4. select CRYPTO
  5. # SHA-256 is implied as it's intended to be the default hash algorithm.
  6. # To avoid bloat, other wanted algorithms must be selected explicitly.
  7. # Note that CRYPTO_SHA256 denotes the generic C implementation, but
  8. # some architectures provided optimized implementations of the same
  9. # algorithm that may be used instead. In this case, CRYPTO_SHA256 may
  10. # be omitted even if SHA-256 is being used.
  11. imply CRYPTO_SHA256
  12. help
  13. This option enables fs-verity. fs-verity is the dm-verity
  14. mechanism implemented at the file level. On supported
  15. filesystems (currently EXT4 and F2FS), userspace can use an
  16. ioctl to enable verity for a file, which causes the filesystem
  17. to build a Merkle tree for the file. The filesystem will then
  18. transparently verify any data read from the file against the
  19. Merkle tree. The file is also made read-only.
  20. This serves as an integrity check, but the availability of the
  21. Merkle tree root hash also allows efficiently supporting
  22. various use cases where normally the whole file would need to
  23. be hashed at once, such as: (a) auditing (logging the file's
  24. hash), or (b) authenticity verification (comparing the hash
  25. against a known good value, e.g. from a digital signature).
  26. fs-verity is especially useful on large files where not all
  27. the contents may actually be needed. Also, fs-verity verifies
  28. data each time it is paged back in, which provides better
  29. protection against malicious disks vs. an ahead-of-time hash.
  30. If unsure, say N.
  31. config FS_VERITY_DEBUG
  32. bool "FS Verity debugging"
  33. depends on FS_VERITY
  34. help
  35. Enable debugging messages related to fs-verity by default.
  36. Say N unless you are an fs-verity developer.
  37. config FS_VERITY_BUILTIN_SIGNATURES
  38. bool "FS Verity builtin signature support"
  39. depends on FS_VERITY
  40. select SYSTEM_DATA_VERIFICATION
  41. help
  42. Support verifying signatures of verity files against the X.509
  43. certificates that have been loaded into the ".fs-verity"
  44. kernel keyring.
  45. This is meant as a relatively simple mechanism that can be
  46. used to provide an authenticity guarantee for verity files, as
  47. an alternative to IMA appraisal. Userspace programs still
  48. need to check that the verity bit is set in order to get an
  49. authenticity guarantee.
  50. If unsure, say N.