From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Boshi Wang <wangboshi@huawei.com>
Cc: linux-integrity <linux-integrity@vger.kernel.org>
Subject: Re: [Linux-ima-devel] [PATCH] ima: fix ineffective default hash algorithm due to invalid hash algorithm boot argument
Date: Tue, 17 Oct 2017 17:58:33 -0400 [thread overview]
Message-ID: <1508277513.4513.63.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <3aaaf65f-d3b0-f770-f074-11e8f9796685@huawei.com>
Hi Boshi,
On Wed, 2017-10-11 at 15:46 +0800, Boshi Wang wrote:
> The hash_setup function always sets hash_setup_done variable. If an
> invalid hash algorithm is passed, the default hash algorithm specified
> by CONFIG_IMA_DEFAULT_HASH could not be used.
>
> Signed-off-by: Wang Boshi <wangboshi@huawei.com>
This patch does not apply properly. To see the problem, save the
patch as an mbox file and then apply it using git am <filename.mbox>.
Mimi
> ---
>
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 2aebb79..ab70a39 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -51,6 +51,8 @@ static int __init hash_setup(char *str)
> ima_hash_algo = HASH_ALGO_SHA1;
> else if (strncmp(str, "md5", 3) == 0)
> ima_hash_algo = HASH_ALGO_MD5;
> + else
> + return 1;
> goto out;
> }
>
> @@ -60,6 +62,8 @@ static int __init hash_setup(char *str)
> break;
> }
> }
> + if (i == HASH_ALGO__LAST)
> + return 1;
> out:
> hash_setup_done = 1;
> return 1;
>
>
>
next parent reply other threads:[~2017-10-17 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3aaaf65f-d3b0-f770-f074-11e8f9796685@huawei.com>
2017-10-17 21:58 ` Mimi Zohar [this message]
2017-10-18 3:36 ` [Linux-ima-devel] [PATCH] ima: fix ineffective default hash algorithm due to invalid hash algorithm boot argument Boshi Wang
2017-10-20 8:01 ` [PATCH] ima: fix hash algorithm initialization Boshi Wang
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=1508277513.4513.63.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=linux-integrity@vger.kernel.org \
--cc=wangboshi@huawei.com \
/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).