Files
lkl_linux/include/linux
Eric Biggers 74836ecbc5 fsverity: rework fsverity_get_digest() again
Address several issues with the calling convention and documentation of
fsverity_get_digest():

- Make it provide the hash algorithm as either a FS_VERITY_HASH_ALG_*
  value or HASH_ALGO_* value, at the caller's choice, rather than only a
  HASH_ALGO_* value as it did before.  This allows callers to work with
  the fsverity native algorithm numbers if they want to.  HASH_ALGO_* is
  what IMA uses, but other users (e.g. overlayfs) should use
  FS_VERITY_HASH_ALG_* to match fsverity-utils and the fsverity UAPI.

- Make it return the digest size so that it doesn't need to be looked up
  separately.  Use the return value for this, since 0 works nicely for
  the "file doesn't have fsverity enabled" case.  This also makes it
  clear that no other errors are possible.

- Rename the 'digest' parameter to 'raw_digest' and clearly document
  that it is only useful in combination with the algorithm ID.  This
  hopefully clears up a point of confusion.

- Export it to modules, since overlayfs will need it for checking the
  fsverity digests of lowerdata files
  (https://lore.kernel.org/r/dd294a44e8f401e6b5140029d8355f88748cd8fd.1686565330.git.alexl@redhat.com).

Acked-by: Mimi Zohar <zohar@linux.ibm.com> # for the IMA piece
Link: https://lore.kernel.org/r/20230612190047.59755-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
2023-06-14 10:41:07 -07:00
..
2023-03-29 12:26:32 +02:00
2023-03-06 12:33:02 +02:00
2023-04-21 14:37:03 +01:00
2023-04-16 08:51:24 -07:00
2023-02-03 08:20:55 -07:00
2023-03-05 10:49:37 -08:00
2023-03-23 16:02:27 -10:00
2023-04-17 18:01:23 +02:00
2023-04-20 18:20:04 +08:00
2023-03-06 15:49:07 -06:00
2023-02-06 19:06:58 +01:00
2023-03-29 16:00:23 +02:00
2023-03-19 10:02:04 -07:00
2023-03-06 12:33:02 +02:00
2023-02-13 10:11:20 +02:00
2023-03-07 22:04:45 +05:30
2023-03-29 12:26:32 +02:00
2023-03-15 14:58:52 +01:00
2023-04-03 11:16:56 +02:00
2023-03-06 09:57:07 +01:00
2023-03-17 15:00:40 +01:00
2023-03-16 13:08:39 -07:00
2023-03-23 17:25:46 +01:00
2023-03-29 08:19:38 +01:00
2023-04-05 20:03:01 -07:00
2023-04-21 03:02:34 -04:00
2023-03-06 09:57:11 +01:00