From: Grygorii Tertychnyi <grembeter@gmail.com>
To: yocto-patches@lists.yoctoproject.org
Cc: Grygorii Tertychnyi <grembeter@gmail.com>
Subject: [meta-security][PATCH] dm-verity-img.bbclass: add DM_VERITY_SETUP_ARGS
Date: Sat, 9 Nov 2024 12:31:45 +0100 [thread overview]
Message-ID: <20241109113145.1254-1-grembeter@gmail.com> (raw)
Useful to pass additional arguments to veritysetup, for example
'--no-superblock' to make system less vulnerable to certain types of
attacks and data maniputaion on the disk.
Signed-off-by: Grygorii Tertychnyi <grembeter@gmail.com>
---
classes/dm-verity-img.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass
index 7f79548353b0..9a3a97ec6c26 100644
--- a/classes/dm-verity-img.bbclass
+++ b/classes/dm-verity-img.bbclass
@@ -46,6 +46,9 @@ DM_VERITY_IMAGE_HASH_BLOCK_SIZE ?= "4096"
# Should we store the hash data on a separate device/partition?
DM_VERITY_SEPARATE_HASH ?= "0"
+# Additional arguments for veritysetup
+DM_VERITY_SETUP_ARGS ?= ""
+
# These are arch specific. We could probably intelligently auto-assign these?
# Take x86-64 values as defaults. No impact on functionality currently.
# See SD_GPT_ROOT_X86_64 and SD_GPT_ROOT_X86_64_VERITY in the spec.
@@ -146,6 +149,7 @@ verity_setup() {
cp -a $INPUT $OUTPUT
SETUP_ARGS=" \
+ ${DM_VERITY_SETUP_ARGS} \
--data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} \
--hash-block-size=${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} \
$HASH_OFFSET format $OUTPUT $OUTPUT_HASH \
--
2.39.5
reply other threads:[~2024-11-09 11:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241109113145.1254-1-grembeter@gmail.com \
--to=grembeter@gmail.com \
--cc=yocto-patches@lists.yoctoproject.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 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.