From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huaweicloud.com>, dmitry.kasatkin@gmail.com
Cc: linux-integrity@vger.kernel.org, vt@altlinux.org, pvorel@suse.cz,
stefanb@linux.ibm.com, Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH ima-evm-utils v2] Add ima_policy_check.awk and ima_policy_check.test
Date: Wed, 15 Feb 2023 18:39:52 -0500 [thread overview]
Message-ID: <d09e5c3b35ff101a19598e73e65a623be484e147.camel@linux.ibm.com> (raw)
In-Reply-To: <20230214152258.3553294-1-roberto.sassu@huaweicloud.com>
On Tue, 2023-02-14 at 16:22 +0100, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@huawei.com>
>
> Add ima_policy_check.awk to check for possible overlapping of a rule being
> added by a test with the existing IMA policy (policy replacement by IMA at
> the first policy load is not taken into account).
>
> ima_policy_check.awk expects as input the rule to be added, followed by the
> IMA policy.
>
> It returns a bit mask with the following values:
> - 1: invalid new rule;
> - 2: overlap of the new rule with an existing rule in the IMA policy;
> - 4: new rule exists in the IMA policy.
>
> Values can be individually checked by the test executing the awk script, to
> determine what to do (abort loading, print a warning in case of overlap,
> avoid adding an existing rule).
>
> The bit mask allows the test to see multiple statements regarding the new
> rule. For example, if the test added anyway an overlapping rule, it could
> also see that the policy already contains it at the next test execution,
> and does not add it again.
>
> Since ima_policy_check.awk uses GNU extensions (such as the or() function,
> or the fourth argument of split()), add gawk as dependency for the CI.
>
> Finally add ima_policy_check.test, to ensure that the awk script behaves as
> expected.
>
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Roberto, I dropped a couple of your patches from the "next-testing"
branch, assuming the "Introduce expect_pass_if() and expect_fail_if()"
and this patch are prerequisites for the "Add tests for MMAP_CHECK and
MMAP_CHECK_REQPROT hooks" patch.
thanks,
Mimi
next prev parent reply other threads:[~2023-02-15 23:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 15:22 [PATCH ima-evm-utils v2] Add ima_policy_check.awk and ima_policy_check.test Roberto Sassu
2023-02-15 23:39 ` Mimi Zohar [this message]
2023-02-16 8:18 ` Roberto Sassu
2023-02-16 3:22 ` Mimi Zohar
2023-02-16 8:39 ` Roberto Sassu
2023-02-16 13:13 ` Mimi Zohar
2023-02-16 13:30 ` Roberto Sassu
2023-02-16 13:40 ` 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:
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=d09e5c3b35ff101a19598e73e65a623be484e147.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=linux-integrity@vger.kernel.org \
--cc=pvorel@suse.cz \
--cc=roberto.sassu@huawei.com \
--cc=roberto.sassu@huaweicloud.com \
--cc=stefanb@linux.ibm.com \
--cc=vt@altlinux.org \
/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