From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Mimi Zohar <zohar@linux.ibm.com>,
dhowells@redhat.com, casey@schaufler-ca.com, sashal@kernel.org,
jamorris@linux.microsoft.com,
linux-security-module@vger.kernel.org,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
keyrings@vger.kernel.org
Subject: Re: [PATCH v2 1/4] KEYS: Defined an ima hook for measuring keys on key create or update
Date: Fri, 25 Oct 2019 12:49:45 -0700 [thread overview]
Message-ID: <715d35ba-a102-3524-77a8-70a784628b46@linux.microsoft.com> (raw)
In-Reply-To: <1572032428.4532.72.camel@linux.ibm.com>
On 10/25/2019 12:40 PM, Mimi Zohar wrote:
> On Wed, 2019-10-23 at 16:39 -0700, Lakshmi Ramasubramanian wrote:
>> Defined an ima hook to measure keys created or updated in the system.
>
> "IMA" is an anacronym. Unless it is a part of a function name, it
> should be capitalized.
Will fix that.
>
> Before describing "what" you're doing, describe the problem. For
> example, "The asymmetric keys used for verifying file signatures or
> certificates are currently not included in the IMA measurement list.
> This patch defines a new IMA hook named ima_key_create_or_update() to
> measure keys."
Agree - will update.
>> +
>> + if (!ima_initialized)
>> + return;
>
> There's no reason to define a new variable to determine if IMA is
> initialized. Use ima_policy_flag.
Will change it.
> Like process_measurements, the test should be in process_buffer_measurement(), not here.
Currently, queuing of requests when IMA is not initialized is done for
keys only. Moving that check inside process_buffer_measurement would
mean handling queuing for all buffer measurements.
Can that be done as a separate patch set and not in this one?
>> @@ -936,6 +937,9 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,
>> goto error_link_end;
>> }
>>
>> + /* let the ima module know about the created key. */
>> + ima_post_key_create_or_update(keyring, key, flags, true);
>> +
>> key_ref = make_key_ref(key, is_key_possessed(keyring_ref));
>
> This patch defines the new IMA hook. This call and the subsequent one
> below can be defined in a separate patch. The subject line of that
> patch would be "keys: Add ima_key_create_or_update call to measure
> keys".
>
> Mimi
Agree - will change it.
thanks,
-lakshmi
next prev parent reply other threads:[~2019-10-25 19:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 23:39 [PATCH v2 0/4] KEYS: measure keys when they are created or updated Lakshmi Ramasubramanian
2019-10-23 23:39 ` [PATCH v2 1/4] KEYS: Defined an ima hook for measuring keys on key create or update Lakshmi Ramasubramanian
2019-10-25 19:40 ` Mimi Zohar
2019-10-25 19:49 ` Lakshmi Ramasubramanian [this message]
2019-10-25 22:28 ` Lakshmi Ramasubramanian
2019-10-27 14:47 ` Mimi Zohar
2019-10-28 14:58 ` Lakshmi Ramasubramanian
2019-10-23 23:39 ` [PATCH v2 2/4] KEYS: Queue key for measurement if ima is not initialized. Measure queued keys when ima is initialized Lakshmi Ramasubramanian
2019-10-23 23:39 ` [PATCH v2 3/4] KEYS: Added BUILTIN_TRUSTED_KEYS enum to measure keys added to builtin_trusted_keys keyring Lakshmi Ramasubramanian
2019-10-27 14:33 ` Mimi Zohar
2019-10-28 15:12 ` Lakshmi Ramasubramanian
2019-10-28 17:08 ` Mimi Zohar
2019-10-28 15:56 ` Lakshmi Ramasubramanian
2019-10-23 23:39 ` [PATCH v2 4/4] KEYS: Enabled ima policy " Lakshmi Ramasubramanian
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=715d35ba-a102-3524-77a8-70a784628b46@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=casey@schaufler-ca.com \
--cc=dhowells@redhat.com \
--cc=jamorris@linux.microsoft.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=zohar@linux.ibm.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).