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 v6] Add tests for MMAP_CHECK and MMAP_CHECK_REQPROT hooks
Date: Thu, 02 Mar 2023 12:20:59 -0500 [thread overview]
Message-ID: <0407924e1ad9223eed20c9cc1e3ccf685519656c.camel@linux.ibm.com> (raw)
In-Reply-To: <20230301100822.232187-1-roberto.sassu@huaweicloud.com>
Hi Roberto,
> diff --git a/tests/mmap_check.test b/tests/mmap_check.test
> new file mode 100755
> index 00000000000..3a42fec179e
> --- /dev/null
> +++ b/tests/mmap_check.test
> @@ -0,0 +1,407 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Copyright (C) 2022-2023 Roberto Sassu <roberto.sassu@huawei.com>
> +#
> +# Check the behavior of MMAP_CHECK and MMAP_CHECK_REQPROT
> +
> +trap '_report_exit_and_cleanup _cleanup_env cleanup' SIGINT SIGTERM SIGSEGV EXIT
> +
> +PATCHES=(
> +'ima: Align ima_file_mmap() parameters with mmap_file LSM hook'
> +'ima: Introduce MMAP_CHECK_REQPROT hook'
> +)
> +
> +(( ret_invalid_rule=1 ))
> +(( ret_rule_overlap=2 ))
> +(( ret_same_rule_exists=4 ))
New to v6 is the defintiion of these variables. Is there a reason for
defining them here as opposed to in check_load_ima_rule(), where they
could be defined as local? Here they're global and should be in upper
case like the the variables below.
> +
> +(( EVM_INIT_HMAC=0x0001 ))
> +(( EVM_INIT_X509=0x0002 ))
Is there a reason for initializing these variables differently than
those below? For example, EVM_INIT_HMAC could be define as
EVM_INIT_HMAC=$((0x0001)).
+# Base VERBOSE on the environment variable, if set.
> +VERBOSE="${VERBOSE:-0}"
> +
> +# Errors defined in test_mmap
> +ERR_SETUP=1
> +ERR_TEST=2
--
thanks,
Mimi
next prev parent reply other threads:[~2023-03-02 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 10:08 [PATCH ima-evm-utils v6] Add tests for MMAP_CHECK and MMAP_CHECK_REQPROT hooks Roberto Sassu
2023-03-02 17:20 ` Mimi Zohar [this message]
2023-03-02 17:44 ` Roberto Sassu
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=0407924e1ad9223eed20c9cc1e3ccf685519656c.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