Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Cc: Petr Vorel <pvorel@suse.cz>, Mimi Zohar <zohar@linux.ibm.com>,
	linux-integrity@vger.kernel.org
Subject: [PATCH] IMA: measure.policy: limit dont_measure tmpfs policy to func=FILE_CHECK
Date: Mon,  3 Feb 2025 22:02:33 +0100	[thread overview]
Message-ID: <20250203210233.1407530-1-pvorel@suse.cz> (raw)

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>
---
 .../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
-- 
2.47.2


             reply	other threads:[~2025-02-03 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 21:02 Petr Vorel [this message]
2025-02-03 23:48 ` [PATCH] IMA: measure.policy: limit dont_measure tmpfs policy to func=FILE_CHECK Mimi Zohar
2025-02-04 11:25   ` 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=20250203210233.1407530-1-pvorel@suse.cz \
    --to=pvorel@suse.cz \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=zohar@linux.ibm.com \
    /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