From: Ard Biesheuvel <email@example.com> To: firstname.lastname@example.org Cc: email@example.com, Ard Biesheuvel <firstname.lastname@example.org>, "Theodore Y. Ts'o" <email@example.com>, Jaegeuk Kim <firstname.lastname@example.org>, Eric Biggers <email@example.com> Subject: [PATCH 2/2] fsverity: relax build time dependency on CRYPTO_SHA256 Date: Fri, 16 Apr 2021 18:06:42 +0200 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> CONFIG_CRYPTO_SHA256 denotes the generic C implementation of the SHA-256 shash algorithm, which is selected as the default crypto shash provider for fsverity. However, fsverity has no strict link time dependency, and the same shash could be exposed by an optimized implementation, and arm64 has a number of those (scalar, NEON-based and one based on special crypto instructions). In such cases, it makes little sense to require that the generic C implementation is incorporated as well, given that it will never be called. To address this, relax the 'select' clause to 'imply' so that the generic driver can be omitted from the build if desired. Signed-off-by: Ard Biesheuvel <firstname.lastname@example.org> --- fs/verity/Kconfig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/verity/Kconfig b/fs/verity/Kconfig index 88fb25119899..24d1b54de807 100644 --- a/fs/verity/Kconfig +++ b/fs/verity/Kconfig @@ -3,9 +3,13 @@ config FS_VERITY bool "FS Verity (read-only file-based authenticity protection)" select CRYPTO - # SHA-256 is selected as it's intended to be the default hash algorithm. + # SHA-256 is implied as it's intended to be the default hash algorithm. # To avoid bloat, other wanted algorithms must be selected explicitly. - select CRYPTO_SHA256 + # Note that CRYPTO_SHA256 denotes the generic C implementation, but + # some architectures provided optimized implementations of the same + # algorithm that may be used instead. In this case, CRYPTO_SHA256 may + # be omitted even if SHA-256 is being used. + imply CRYPTO_SHA256 help This option enables fs-verity. fs-verity is the dm-verity mechanism implemented at the file level. On supported -- 2.30.2
next prev parent reply other threads:[~2021-04-16 16:06 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-16 16:06 [PATCH 0/2] relax crypto Kconfig dependencies for fsverity/fscrypt Ard Biesheuvel 2021-04-16 16:06 ` [PATCH 1/2] fscrypt: relax Kconfig dependencies for crypto API algorithms Ard Biesheuvel 2021-04-19 22:03 ` Eric Biggers 2021-04-16 16:06 ` Ard Biesheuvel [this message] 2021-04-19 22:05 ` [PATCH 2/2] fsverity: relax build time dependency on CRYPTO_SHA256 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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH 2/2] fsverity: relax build time dependency on CRYPTO_SHA256' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).