From: Mimi Zohar <zohar@linux.ibm.com>
To: Eric Biggers <ebiggers@kernel.org>, fsverity@lists.linux.dev
Cc: linux-integrity@vger.kernel.org, linux-unionfs@vger.kernel.org,
Alexander Larsson <alexl@redhat.com>
Subject: Re: [PATCH] fsverity: rework fsverity_get_digest() again
Date: Wed, 14 Jun 2023 09:30:00 -0400 [thread overview]
Message-ID: <a8e4d70d2b46f41827375d9290131ea93ad5830a.camel@linux.ibm.com> (raw)
In-Reply-To: <20230612190047.59755-1-ebiggers@kernel.org>
On Mon, 2023-06-12 at 12:00 -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> 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).
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Mimi Zohar <zohar@linux.ibm.com> for the IMA piece.
next prev parent reply other threads:[~2023-06-14 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 19:00 [PATCH] fsverity: rework fsverity_get_digest() again Eric Biggers
2023-06-14 13:30 ` Mimi Zohar [this message]
2023-06-14 17:48 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8e4d70d2b46f41827375d9290131ea93ad5830a.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=alexl@redhat.com \
--cc=ebiggers@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox