Kconfig 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. select CRYPTO_HASH_INFO
  6. # SHA-256 is implied as it's intended to be the default hash algorithm.
  7. # To avoid bloat, other wanted algorithms must be selected explicitly.
  8. # Note that CRYPTO_SHA256 denotes the generic C implementation, but
  9. # some architectures provided optimized implementations of the same
  10. # algorithm that may be used instead. In this case, CRYPTO_SHA256 may
  11. # be omitted even if SHA-256 is being used.
  12. imply CRYPTO_SHA256
  13. help
  14. This option enables fs-verity. fs-verity is the dm-verity
  15. mechanism implemented at the file level. On supported
  16. filesystems (currently ext4, f2fs, and btrfs), userspace can
  17. use an ioctl to enable verity for a file, which causes the
  18. filesystem to build a Merkle tree for the file. The filesystem
  19. will then transparently verify any data read from the file
  20. against the Merkle tree. The file is also made read-only.
  21. This serves as an integrity check, but the availability of the
  22. Merkle tree root hash also allows efficiently supporting
  23. various use cases where normally the whole file would need to
  24. be hashed at once, such as: (a) auditing (logging the file's
  25. hash), or (b) authenticity verification (comparing the hash
  26. against a known good value, e.g. from a digital signature).
  27. fs-verity is especially useful on large files where not all
  28. the contents may actually be needed. Also, fs-verity verifies
  29. data each time it is paged back in, which provides better
  30. protection against malicious disks vs. an ahead-of-time hash.
  31. If unsure, say N.
  32. config FS_VERITY_BUILTIN_SIGNATURES
  33. bool "FS Verity builtin signature support"
  34. depends on FS_VERITY
  35. select SYSTEM_DATA_VERIFICATION
  36. help
  37. This option adds support for in-kernel verification of
  38. fs-verity builtin signatures.
  39. Please take great care before using this feature. It is not
  40. the only way to do signatures with fs-verity, and the
  41. alternatives (such as userspace signature verification, and
  42. IMA appraisal) can be much better. For details about the
  43. limitations of this feature, see
  44. Documentation/filesystems/fsverity.rst.
  45. If unsure, say N.