linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] ima: Provide more info about buffer measurement
@ 2021-07-05  9:09 Roberto Sassu
  2021-07-05  9:09 ` [PATCH v3 1/3] ima: Introduce ima_get_current_hash_algo() Roberto Sassu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Roberto Sassu @ 2021-07-05  9:09 UTC (permalink / raw)
  To: zohar, paul
  Cc: stephen.smalley.work, prsriva02, tusharsu, nramas,
	linux-integrity, linux-security-module, linux-kernel, selinux,
	Roberto Sassu

This patch set provides more information about buffer measurement.

First, it introduces the new function ima_get_current_hash_algo(), to
obtain the algorithm used to calculate the buffer digest (patch 1).

Second, it changes the type of return value of ima_measure_critical_data()
and process_buffer_measurement() from void to int, to signal to the callers
whether or not the buffer has been measured, or just the digest has been
calculated and written to the supplied location (patch 2).

Lastly, it adds two new parameters to the functions above ('digest' and
'digest_len'), so that those functions can write the buffer digest to the
location supplied by the callers (patch 3).

This patch set replaces the patch 'ima: Add digest, algo, measured
parameters to ima_measure_critical_data()' in:

https://lore.kernel.org/linux-integrity/20210625165614.2284243-1-roberto.sassu@huawei.com/

Changelog

v2:
- remove assignments of ima_measure_critical_data() and
  process_buffer_measurement() return values (suggested by Lakshmi)

v1:
- add digest_len parameter to ima_measure_critical_data() and
  process_buffer_measurement() (suggested by Lakshmi)
- fix doc formatting issues

Huawei Digest Lists patch set:
- introduce ima_get_current_hash_algo() (suggested by Mimi)
- remove algo and measured parameters from ima_measure_critical_data() and
  process_buffer_measurement() (suggested by Mimi)
- return an integer from ima_measure_critical_data() and
  process_buffer_measurement() (suggested by Mimi)
- correctly check when process_buffer_measurement() should return earlier

Roberto Sassu (3):
  ima: Introduce ima_get_current_hash_algo()
  ima: Return int in the functions to measure a buffer
  ima: Add digest and digest_len params to the functions to measure a
    buffer

 include/linux/ima.h                          | 23 +++++--
 security/integrity/ima/ima.h                 | 10 +--
 security/integrity/ima/ima_appraise.c        |  2 +-
 security/integrity/ima/ima_asymmetric_keys.c |  2 +-
 security/integrity/ima/ima_init.c            |  3 +-
 security/integrity/ima/ima_main.c            | 67 ++++++++++++++------
 security/integrity/ima/ima_queue_keys.c      |  2 +-
 security/selinux/ima.c                       |  6 +-
 8 files changed, 78 insertions(+), 37 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-07-20 13:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05  9:09 [PATCH v3 0/3] ima: Provide more info about buffer measurement Roberto Sassu
2021-07-05  9:09 ` [PATCH v3 1/3] ima: Introduce ima_get_current_hash_algo() Roberto Sassu
2021-07-05  9:09 ` [PATCH v3 2/3] ima: Return int in the functions to measure a buffer Roberto Sassu
2021-07-06 19:21   ` Lakshmi Ramasubramanian
2021-07-19 20:28   ` Mimi Zohar
2021-07-20 12:38     ` Roberto Sassu
2021-07-20 13:01       ` Mimi Zohar
2021-07-05  9:09 ` [PATCH v3 3/3] ima: Add digest and digest_len params to " Roberto Sassu
2021-07-06 19:24   ` Lakshmi Ramasubramanian
2021-07-13  2:40   ` Paul Moore
2021-07-19 20:59   ` Mimi Zohar

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).