diff options
author | gr embeter <grembeter=gmail.com@lists.yoctoproject.org> | 2024-11-09 12:31:45 +0100 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-12-16 12:49:04 -0500 |
commit | 29d46054c2a3c71ae1ad164a6f32bd6ecbe1b07b (patch) | |
tree | 51b1720b76c1e7d4da52086dded5bd4d92ae67a4 | |
parent | c9585ebfe802139c7a3452352723d117c82cc3af (diff) | |
download | meta-security-29d46054c2a3c71ae1ad164a6f32bd6ecbe1b07b.tar.gz |
dm-verity-img.bbclass: add DM_VERITY_SETUP_ARGS
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | classes/dm-verity-img.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass index 7f79548..9a3a97e 100644 --- a/classes/dm-verity-img.bbclass +++ b/classes/dm-verity-img.bbclass | |||
@@ -46,6 +46,9 @@ DM_VERITY_IMAGE_HASH_BLOCK_SIZE ?= "4096" | |||
46 | # Should we store the hash data on a separate device/partition? | 46 | # Should we store the hash data on a separate device/partition? |
47 | DM_VERITY_SEPARATE_HASH ?= "0" | 47 | DM_VERITY_SEPARATE_HASH ?= "0" |
48 | 48 | ||
49 | # Additional arguments for veritysetup | ||
50 | DM_VERITY_SETUP_ARGS ?= "" | ||
51 | |||
49 | # These are arch specific. We could probably intelligently auto-assign these? | 52 | # These are arch specific. We could probably intelligently auto-assign these? |
50 | # Take x86-64 values as defaults. No impact on functionality currently. | 53 | # Take x86-64 values as defaults. No impact on functionality currently. |
51 | # See SD_GPT_ROOT_X86_64 and SD_GPT_ROOT_X86_64_VERITY in the spec. | 54 | # See SD_GPT_ROOT_X86_64 and SD_GPT_ROOT_X86_64_VERITY in the spec. |
@@ -146,6 +149,7 @@ verity_setup() { | |||
146 | cp -a $INPUT $OUTPUT | 149 | cp -a $INPUT $OUTPUT |
147 | 150 | ||
148 | SETUP_ARGS=" \ | 151 | SETUP_ARGS=" \ |
152 | ${DM_VERITY_SETUP_ARGS} \ | ||
149 | --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} \ | 153 | --data-block-size=${DM_VERITY_IMAGE_DATA_BLOCK_SIZE} \ |
150 | --hash-block-size=${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} \ | 154 | --hash-block-size=${DM_VERITY_IMAGE_HASH_BLOCK_SIZE} \ |
151 | $HASH_OFFSET format $OUTPUT $OUTPUT_HASH \ | 155 | $HASH_OFFSET format $OUTPUT $OUTPUT_HASH \ |