From: Mimi Zohar <zohar@linux.ibm.com>
To: THOBY Simon <Simon.THOBY@viveris.fr>,
"dmitry.kasatkin@gmail.com" <dmitry.kasatkin@gmail.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
BARVAUX Didier <Didier.BARVAUX@viveris.fr>
Subject: Re: [PATCH v4 1/5] IMA: remove the dependency on CRYPTO_MD5
Date: Tue, 27 Jul 2021 13:57:39 -0400 [thread overview]
Message-ID: <01510e984cbef37193f43840776e073f8ace7917.camel@linux.ibm.com> (raw)
In-Reply-To: <20210727163330.790010-2-simon.thoby@viveris.fr>
Hi Simon,
On Tue, 2021-07-27 at 16:33 +0000, THOBY Simon wrote:
<snip>
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 287b90509006..d171764230b7 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -53,8 +53,10 @@ static int __init hash_setup(char *str)
> if (strcmp(template_desc->name, IMA_TEMPLATE_IMA_NAME) == 0) {
> if (strncmp(str, "sha1", 4) == 0) {
> ima_hash_algo = HASH_ALGO_SHA1;
> +#ifdef CONFIG_CRYPTO_MD5
As much as possible ifdef's should be avoided in C code. If
necessary, using the IS_ENABLED macro is preferred.
> } else if (strncmp(str, "md5", 3) == 0) {
> ima_hash_algo = HASH_ALGO_MD5;
> +#endif
> } else {
> pr_err("invalid hash algorithm \"%s\" for template \"%s\"",
> str, IMA_TEMPLATE_IMA_NAME);
thanks,
Mimi
next prev parent reply other threads:[~2021-07-27 17:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 16:33 [PATCH v4 0/5] IMA: restrict the accepted digest algorithms for THOBY Simon
2021-07-27 16:33 ` [PATCH v4 1/5] IMA: remove the dependency on CRYPTO_MD5 THOBY Simon
2021-07-27 17:57 ` Mimi Zohar [this message]
2021-07-27 16:33 ` [PATCH v4 2/5] IMA: block writes of the security.ima xattr with unsupported algorithms THOBY Simon
2021-07-27 20:32 ` Mimi Zohar
2021-07-28 7:00 ` THOBY Simon
2021-07-28 12:43 ` Mimi Zohar
2021-07-28 12:53 ` THOBY Simon
2021-07-28 13:09 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 3/5] IMA: add support to restrict the hash algorithms used for file appraisal THOBY Simon
2021-07-27 20:38 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 4/5] IMA: add a policy option to restrict xattr hash algorithms on appraisal THOBY Simon
2021-07-27 21:07 ` Mimi Zohar
2021-07-27 16:33 ` [PATCH v4 5/5] IMA: introduce a new policy option func=SETXATTR_CHECK THOBY Simon
2021-07-27 17:25 ` Mimi Zohar
2021-07-27 17:58 ` THOBY Simon
2021-07-27 17:47 ` [PATCH v4 0/5] IMA: restrict the accepted digest algorithms for Mimi Zohar
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=01510e984cbef37193f43840776e073f8ace7917.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=Didier.BARVAUX@viveris.fr \
--cc=Simon.THOBY@viveris.fr \
--cc=dmitry.kasatkin@gmail.com \
--cc=linux-integrity@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;
as well as URLs for NNTP newsgroup(s).