[PATCH v3 3/3] ima: Add digest and digest_len params to the functions to measure a buffer
Paul Moore
paul at paul-moore.com
Tue Jul 13 02:40:00 UTC 2021
On Mon, Jul 5, 2021 at 5:09 AM Roberto Sassu <roberto.sassu at huawei.com> wrote:
>
> This patch adds the 'digest' and 'digest_len' parameters to
> ima_measure_critical_data() and process_buffer_measurement(), so that
> callers can get the digest of the passed buffer.
>
> These functions calculate the digest even if there is no suitable rule in
> the IMA policy and, in this case, they simply return 1 before generating a
> new measurement entry.
>
> Signed-off-by: Roberto Sassu <roberto.sassu at huawei.com>
> ---
> include/linux/ima.h | 5 +--
> security/integrity/ima/ima.h | 2 +-
> 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 | 36 ++++++++++++++------
> security/integrity/ima/ima_queue_keys.c | 2 +-
> security/selinux/ima.c | 6 ++--
> 8 files changed, 39 insertions(+), 19 deletions(-)
The SELinux changes are trivial and fall into that
cross-subsystem-ACK-not-really-necessary category, but why not :)
For the SELinux bits:
Acked-by: Paul Moore <paul at paul-moore.com>
--
paul moore
www.paul-moore.com
More information about the Linux-security-module-archive
mailing list