All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Petr Vorel <pvorel@suse.cz>, ltp@lists.linux.it
Cc: linux-integrity@vger.kernel.org
Subject: Re: [PATCH] IMA: measure.policy: limit dont_measure tmpfs policy to func=FILE_CHECK
Date: Mon, 03 Feb 2025 18:48:10 -0500	[thread overview]
Message-ID: <4e4fb197b7127f8d82705ec441e8a273cd237b7f.camel@linux.ibm.com> (raw)
In-Reply-To: <20250203210233.1407530-1-pvorel@suse.cz>

On Mon, 2025-02-03 at 22:02 +0100, Petr Vorel wrote:
> add func=FILE_CHECK to dont_measure tmpfs
> 
> Similarly to tcb.policy limit dont_measure tmpfs policy to func=FILE_CHECK.
> This allows to do extra measurements, e.g. kexec boot command line, see
> kernel commit
> 
> 7eef7c8bac9a ("ima: limit the builtin 'tcb' dont_measure tmpfs policy rule")
> 
> Also remove leading 0 from tmpfs magic (to match IMA docs and tcb.policy).
> 
> Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

> ---
>  .../security/integrity/ima/datafiles/ima_policy/measure.policy  | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> b/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> index 9976ddf2de..8abd05fb1a 100644
> --- a/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> +++ b/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> @@ -8,7 +8,7 @@ dont_measure fsmagic=0x62656572
>  # DEBUGFS_MAGIC
>  dont_measure fsmagic=0x64626720
>  # TMPFS_MAGIC
> -dont_measure fsmagic=0x01021994
> +dont_measure fsmagic=0x1021994 func=FILE_CHECK
>  # SECURITYFS_MAGIC
>  dont_measure fsmagic=0x73636673
>  measure func=FILE_MMAP mask=MAY_EXEC


WARNING: multiple messages have this Message-ID (diff)
From: Mimi Zohar <zohar@linux.ibm.com>
To: Petr Vorel <pvorel@suse.cz>, ltp@lists.linux.it
Cc: linux-integrity@vger.kernel.org
Subject: Re: [LTP] [PATCH] IMA: measure.policy: limit dont_measure tmpfs policy to func=FILE_CHECK
Date: Mon, 03 Feb 2025 18:48:10 -0500	[thread overview]
Message-ID: <4e4fb197b7127f8d82705ec441e8a273cd237b7f.camel@linux.ibm.com> (raw)
In-Reply-To: <20250203210233.1407530-1-pvorel@suse.cz>

On Mon, 2025-02-03 at 22:02 +0100, Petr Vorel wrote:
> add func=FILE_CHECK to dont_measure tmpfs
> 
> Similarly to tcb.policy limit dont_measure tmpfs policy to func=FILE_CHECK.
> This allows to do extra measurements, e.g. kexec boot command line, see
> kernel commit
> 
> 7eef7c8bac9a ("ima: limit the builtin 'tcb' dont_measure tmpfs policy rule")
> 
> Also remove leading 0 from tmpfs magic (to match IMA docs and tcb.policy).
> 
> Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

> ---
>  .../security/integrity/ima/datafiles/ima_policy/measure.policy  | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> b/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> index 9976ddf2de..8abd05fb1a 100644
> --- a/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> +++ b/testcases/kernel/security/integrity/ima/datafiles/ima_policy/measure.policy
> @@ -8,7 +8,7 @@ dont_measure fsmagic=0x62656572
>  # DEBUGFS_MAGIC
>  dont_measure fsmagic=0x64626720
>  # TMPFS_MAGIC
> -dont_measure fsmagic=0x01021994
> +dont_measure fsmagic=0x1021994 func=FILE_CHECK
>  # SECURITYFS_MAGIC
>  dont_measure fsmagic=0x73636673
>  measure func=FILE_MMAP mask=MAY_EXEC


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-02-04  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 21:02 [PATCH] IMA: measure.policy: limit dont_measure tmpfs policy to func=FILE_CHECK Petr Vorel
2025-02-03 21:02 ` [LTP] " Petr Vorel
2025-02-03 23:48 ` Mimi Zohar [this message]
2025-02-03 23:48   ` Mimi Zohar
2025-02-04 11:25   ` Petr Vorel
2025-02-04 11:25     ` [LTP] " Petr Vorel

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=4e4fb197b7127f8d82705ec441e8a273cd237b7f.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.