2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2020-11-13 13:19:15 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:29 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-03 19:23:48 -07:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:28 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2023-03-27 21:03:26 -07:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:30 -08:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-16 13:34:24 -07:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsverity: use EFBIG for file too large to enable verity
Currently, there is an implementation limit where files can't have more
than 8 Merkle tree levels. With SHA-256 and 4K blocks, this limit is
never reached, since a file would need to be larger than 2**64 bytes to
need 9 levels. However, with SHA-512, 9 levels are needed for files
larger than about 1.15 EB, which is possible on btrfs. Therefore, this
limit technically became reachable when btrfs added fsverity support.
Meanwhile, support for merkle_tree_block_size < PAGE_SIZE will introduce
another implementation limit on file size, resulting from the use of an
in-memory bitmap to track which Merkle tree blocks have been verified.
In any case, currently FS_IOC_ENABLE_VERITY fails with EINVAL when the
file is too large. This is undocumented, and also ambiguous since
EINVAL can mean other things too. Let's change the error code to EFBIG,
which is much clearer, and document it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20221223203638.41293-5-ebiggers@kernel.org
2022-12-23 12:36:31 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:28 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:28 -08:00
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:29 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:23 -07:00
|
|
|
|
2020-11-13 13:19:17 -08:00
|
|
|
|
fsverity: improve documentation for builtin signature support
fsverity builtin signatures (CONFIG_FS_VERITY_BUILTIN_SIGNATURES) aren't
the only way to do signatures with fsverity, and they have some major
limitations. Yet, more users have tried to use them, e.g. recently by
https://github.com/ostreedev/ostree/pull/2640. In most cases this seems
to be because users aren't sufficiently familiar with the limitations of
this feature and what the alternatives are.
Therefore, make some updates to the documentation to try to clarify the
properties of this feature and nudge users in the right direction.
Note that the Integrity Policy Enforcement (IPE) LSM, which is not yet
upstream, is planned to use the builtin signatures. (This differs from
IMA, which uses its own signature mechanism.) For that reason, my
earlier patch "fsverity: mark builtin signatures as deprecated"
(https://lore.kernel.org/r/20221208033548.122704-1-ebiggers@kernel.org),
which marked builtin signatures as "deprecated", was controversial.
This patch therefore stops short of marking the feature as deprecated.
I've also revised the language to focus on better explaining the feature
and what its alternatives are.
Link: https://lore.kernel.org/r/20230620041937.5809-1-ebiggers@kernel.org
Reviewed-by: Colin Walters <walters@verbum.org>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-06-19 21:19:37 -07:00
|
|
|
|
2019-07-22 09:26:23 -07:00
|
|
|
|
2023-06-03 19:23:48 -07:00
|
|
|
|
2020-11-13 13:19:17 -08:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2019-07-22 09:26:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-13 13:19:17 -08:00
|
|
|
|
2019-07-22 09:26:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
fsverity: improve documentation for builtin signature support
fsverity builtin signatures (CONFIG_FS_VERITY_BUILTIN_SIGNATURES) aren't
the only way to do signatures with fsverity, and they have some major
limitations. Yet, more users have tried to use them, e.g. recently by
https://github.com/ostreedev/ostree/pull/2640. In most cases this seems
to be because users aren't sufficiently familiar with the limitations of
this feature and what the alternatives are.
Therefore, make some updates to the documentation to try to clarify the
properties of this feature and nudge users in the right direction.
Note that the Integrity Policy Enforcement (IPE) LSM, which is not yet
upstream, is planned to use the builtin signatures. (This differs from
IMA, which uses its own signature mechanism.) For that reason, my
earlier patch "fsverity: mark builtin signatures as deprecated"
(https://lore.kernel.org/r/20221208033548.122704-1-ebiggers@kernel.org),
which marked builtin signatures as "deprecated", was controversial.
This patch therefore stops short of marking the feature as deprecated.
I've also revised the language to focus on better explaining the feature
and what its alternatives are.
Link: https://lore.kernel.org/r/20230620041937.5809-1-ebiggers@kernel.org
Reviewed-by: Colin Walters <walters@verbum.org>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-06-19 21:19:37 -07:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2022-05-18 21:22:56 +08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-13 13:19:17 -08:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2020-11-13 13:19:17 -08:00
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2019-07-22 09:26:23 -07:00
|
|
|
|
2021-01-15 10:18:15 -08:00
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-21 15:59:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2020-07-21 15:59:20 -07:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2020-07-21 15:59:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-23 12:36:33 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsverity: improve documentation for builtin signature support
fsverity builtin signatures (CONFIG_FS_VERITY_BUILTIN_SIGNATURES) aren't
the only way to do signatures with fsverity, and they have some major
limitations. Yet, more users have tried to use them, e.g. recently by
https://github.com/ostreedev/ostree/pull/2640. In most cases this seems
to be because users aren't sufficiently familiar with the limitations of
this feature and what the alternatives are.
Therefore, make some updates to the documentation to try to clarify the
properties of this feature and nudge users in the right direction.
Note that the Integrity Policy Enforcement (IPE) LSM, which is not yet
upstream, is planned to use the builtin signatures. (This differs from
IMA, which uses its own signature mechanism.) For that reason, my
earlier patch "fsverity: mark builtin signatures as deprecated"
(https://lore.kernel.org/r/20221208033548.122704-1-ebiggers@kernel.org),
which marked builtin signatures as "deprecated", was controversial.
This patch therefore stops short of marking the feature as deprecated.
I've also revised the language to focus on better explaining the feature
and what its alternatives are.
Link: https://lore.kernel.org/r/20230620041937.5809-1-ebiggers@kernel.org
Reviewed-by: Colin Walters <walters@verbum.org>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-06-19 21:19:37 -07:00
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
2022-05-18 21:22:56 +08:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-18 21:22:56 +08:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-18 21:22:56 +08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2021-01-15 10:18:14 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
2022-12-14 14:43:01 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-14 22:04:20 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-14 14:43:01 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-14 14:43:02 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-14 22:04:20 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-14 14:43:02 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2022-12-14 14:43:03 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-14 14:43:03 -08:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2023-07-05 14:27:42 -07:00
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|
2023-07-05 14:27:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-22 09:26:22 -07:00
|
|
|
|