LKML Archive on
help / color / mirror / Atom feed
From: Mimi Zohar <>
To: Roberto Sassu <>,
Subject: Re: [PATCH v3 2/3] ima: Return int in the functions to measure a buffer
Date: Mon, 19 Jul 2021 16:28:11 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Roberto,

On Mon, 2021-07-05 at 11:09 +0200, Roberto Sassu wrote:
> ima_measure_critical_data() and process_buffer_measurement() currently
> don't return a result. A caller wouldn't be able to know whether those
> functions were executed successfully.

Missing is an explanation as to why these functions aren't currently
returning a result.   The LSM/IMA hooks only return a negative result
for failure to appraise a file's integrity, not measure a file.  Only
failure to appraise a file's integrity results in preventing the file
from being read/executed/mmaped.  Other failures are only audited.

> This patch modifies the return type from void to int, and returns 0 if the
> buffer has been successfully measured, a negative value otherwise.

Needed here is an explanation as to why ima_measure_critical_data() is

> Also, this patch does not modify the behavior of existing callers by
> processing the returned value. For those, the return value is ignored.

I agree that the existing behavior shouldn't change, but will this
result in the bots complaining?



  parent reply	other threads:[~2021-07-19 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v3 2/3] ima: Return int in the functions to measure a buffer' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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