summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJia Zhang <lans.zhang2008@gmail.com>2017-08-20 15:31:11 +0800
committerJia Zhang <lans.zhang2008@gmail.com>2017-08-20 15:31:11 +0800
commitb1e14f4e88be503f91db9c51c89a5a9f5e30de91 (patch)
treecfa6161eb622b85b5413db8bc99bcf6aef7828cc
parentcbdefad44c474bd8a6c987442ccc0d6d11234c68 (diff)
downloadmeta-secure-core-b1e14f4e88be503f91db9c51c89a5a9f5e30de91.tar.gz
encrypted-storage: use luks as the feature name for current implementation
encrypted-storage layer will include more security features about encrypted storage so the term "encrypted-storage" won't be used to specify a dedicated technology term such as "LUKS". Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
-rw-r--r--README6
-rw-r--r--meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend9
-rw-r--r--meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb8
-rw-r--r--meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks-initramfs.bb8
-rw-r--r--meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.bb (renamed from meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb)4
-rw-r--r--meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.inc (renamed from meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc)0
-rw-r--r--meta-encrypted-storage/recipes-core/systemd/systemd_%.bbappend2
-rw-r--r--meta-encrypted-storage/recipes-kernel/linux/linux-yocto-luks.inc (renamed from meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc)2
-rw-r--r--meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend2
-rw-r--r--meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend2
-rw-r--r--meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb2
-rw-r--r--meta-integrity/README.md6
-rw-r--r--meta/recipes-core/images/secure-core-image-initramfs.bb4
-rw-r--r--meta/recipes-core/images/secure-core-image.inc4
14 files changed, 29 insertions, 30 deletions
diff --git a/README b/README
index e4402f8..9fbdcea 100644
--- a/README
+++ b/README
@@ -75,14 +75,14 @@ The full features in meta-secure-core can be configured with these definitions
75in local.conf: 75in local.conf:
76 76
77INITRAMFS_IMAGE = "secure-core-image-initramfs" 77INITRAMFS_IMAGE = "secure-core-image-initramfs"
78DISTRO_FEATURES_NATIVE_append += " ima tpm tpm2 efi-secure-boot encrypted-storage" 78DISTRO_FEATURES_NATIVE_append += " ima tpm tpm2 efi-secure-boot luks"
79DISTRO_FEATURES_append += " ima tpm tpm2 efi-secure-boot encrypted-storage" 79DISTRO_FEATURES_append += " ima tpm tpm2 efi-secure-boot luks"
80SECURE_CORE_IMAGE_EXTRA_INSTALL ?= "\ 80SECURE_CORE_IMAGE_EXTRA_INSTALL ?= "\
81 packagegroup-efi-secure-boot \ 81 packagegroup-efi-secure-boot \
82 packagegroup-tpm \ 82 packagegroup-tpm \
83 packagegroup-tpm2 \ 83 packagegroup-tpm2 \
84 packagegroup-ima \ 84 packagegroup-ima \
85 packagegroup-encrypted-storage \ 85 packagegroup-luks \
86" 86"
87DEBUG_FLAGS_forcevariable = "" 87DEBUG_FLAGS_forcevariable = ""
88 88
diff --git a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend
index da02b5c..1700adc 100644
--- a/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend
+++ b/meta-efi-secure-boot/recipes-bsp/grub/grub-efi_2.02.bbappend
@@ -65,11 +65,10 @@ do_install_append_class-native() {
65do_install_append_class-target() { 65do_install_append_class-target() {
66 local menu="${WORKDIR}/boot-menu.inc" 66 local menu="${WORKDIR}/boot-menu.inc"
67 67
68 # Enable the default IMA rules if IMA is enabled and encrypted-storage is 68 # Enable the default IMA rules if IMA is enabled and luks is disabled.
69 # disabled. This is because unseal operation will fail when any PCR is 69 # This is because unseal operation will fail when any PCR is extended
70 # extended due to updating the aggregate integrity value by the default 70 # due to updating the aggregate integrity value by the default IMA rules.
71 # IMA rules. 71 [ x"${IMA}" = x"1" -a x"${@bb.utils.contains('DISTRO_FEATURES', 'luks', '1', '0', d)}" != x"1" ] && {
72 [ x"${IMA}" = x"1" -a x"${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', '1', '0', d)}" != x"1" ] && {
73 ! grep -q "ima_policy=tcb" "$menu" && 72 ! grep -q "ima_policy=tcb" "$menu" &&
74 sed -i 's/^\s*linux\s\+.*bzImage.*/& ima_policy=tcb/g' "$menu" 73 sed -i 's/^\s*linux\s\+.*bzImage.*/& ima_policy=tcb/g' "$menu"
75 } 74 }
diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb
deleted file mode 100644
index 91c16fd..0000000
--- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage-initramfs.bb
+++ /dev/null
@@ -1,8 +0,0 @@
1DESCRIPTION = "The packages used for encrypted storage in initramfs."
2
3require packagegroup-encrypted-storage.inc
4
5RDEPENDS_${PN} += "\
6 cryptfs-tpm2-initramfs \
7 packagegroup-tpm2-initramfs \
8"
diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks-initramfs.bb b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks-initramfs.bb
new file mode 100644
index 0000000..34bc907
--- /dev/null
+++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks-initramfs.bb
@@ -0,0 +1,8 @@
1DESCRIPTION = "The packages used for luks in initramfs."
2
3require packagegroup-luks.inc
4
5RDEPENDS_${PN} += "\
6 cryptfs-tpm2-initramfs \
7 packagegroup-tpm2-initramfs \
8"
diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.bb
index 46ed2a8..fd0c162 100644
--- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.bb
+++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.bb
@@ -1,6 +1,6 @@
1DESCRIPTION = "The packages used for encrypted storage." 1DESCRIPTION = "The packages used for LUKS."
2 2
3require packagegroup-encrypted-storage.inc 3require packagegroup-luks.inc
4 4
5# Install the minimal stuffs only for the linux rootfs. 5# Install the minimal stuffs only for the linux rootfs.
6# The common packages shared between initramfs and rootfs 6# The common packages shared between initramfs and rootfs
diff --git a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.inc
index b3fa991..b3fa991 100644
--- a/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-encrypted-storage.inc
+++ b/meta-encrypted-storage/recipes-base/packagegroups/packagegroup-luks.inc
diff --git a/meta-encrypted-storage/recipes-core/systemd/systemd_%.bbappend b/meta-encrypted-storage/recipes-core/systemd/systemd_%.bbappend
index 166b6a8..9bd4ee1 100644
--- a/meta-encrypted-storage/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-encrypted-storage/recipes-core/systemd/systemd_%.bbappend
@@ -1,4 +1,4 @@
1#PACKAGECONFIG_append += "\ 1#PACKAGECONFIG_append += "\
2# ${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', \ 2# ${@bb.utils.contains('DISTRO_FEATURES', 'luks', \
3# 'cryptsetup', '', d)} \ 3# 'cryptsetup', '', d)} \
4#" 4#"
diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-luks.inc
index faa613f..91dceb6 100644
--- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-encrypted-storage.inc
+++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-luks.inc
@@ -1,6 +1,6 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" 1FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
2 2
3SRC_URI += "\ 3SRC_URI += "\
4 ${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', \ 4 ${@bb.utils.contains('DISTRO_FEATURES', 'luks', \
5 'file://dmcrypt.scc file://dmcrypt.cfg', '', d)} \ 5 'file://dmcrypt.scc file://dmcrypt.cfg', '', d)} \
6" 6"
diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend
index fc85431..49d5d48 100644
--- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend
+++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto-rt_%.bbappend
@@ -1 +1 @@
include linux-yocto-encrypted-storage.inc include linux-yocto-luks.inc
diff --git a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend
index fc85431..49d5d48 100644
--- a/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/meta-encrypted-storage/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -1 +1 @@
include linux-yocto-encrypted-storage.inc include linux-yocto-luks.inc
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
index 97c0fbd..217cf65 100644
--- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
+++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
@@ -44,7 +44,7 @@ PARALLEL_MAKE = ""
44do_install() { 44do_install() {
45 oe_runmake install DESTDIR="${D}" 45 oe_runmake install DESTDIR="${D}"
46 46
47 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'encrypted-storage', '1', '0', d)}" = "1" ]; then 47 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'luks', '1', '0', d)}" = "1" ]; then
48 install -m 0500 "${S}/scripts/init.cryptfs" "${D}" 48 install -m 0500 "${S}/scripts/init.cryptfs" "${D}"
49 fi 49 fi
50} 50}
diff --git a/meta-integrity/README.md b/meta-integrity/README.md
index 82db535..8ffd484 100644
--- a/meta-integrity/README.md
+++ b/meta-integrity/README.md
@@ -170,9 +170,9 @@ The following best practices should be applied with using IMA.
170 170
171- The default IMA rules provides the ability of measuring the boot components 171- The default IMA rules provides the ability of measuring the boot components
172 and calculating the aggregate integrity value for attesting. However, this 172 and calculating the aggregate integrity value for attesting. However, this
173 function conflicts with encrypted-storage feature which employs PCR policy 173 function conflicts with the luks feature which employs PCR policy session to
174 session to retrieve the passphrase in a safe way. If both of them are 174 retrieve the passphrase in a safe way. If both of them are enabled, the
175 enabled, the default IMA rules will be not used. 175 default IMA rules will be not used.
176 176
177### Reference 177### Reference
178[Official IMA wiki page](https://sourceforge.net/p/linux-ima/wiki/Home/) 178[Official IMA wiki page](https://sourceforge.net/p/linux-ima/wiki/Home/)
diff --git a/meta/recipes-core/images/secure-core-image-initramfs.bb b/meta/recipes-core/images/secure-core-image-initramfs.bb
index 1b97261..87eaec2 100644
--- a/meta/recipes-core/images/secure-core-image-initramfs.bb
+++ b/meta/recipes-core/images/secure-core-image-initramfs.bb
@@ -8,8 +8,8 @@ ROOTFS_BOOTSTRAP_INSTALL_append += "\
8 "packagegroup-tpm2-initramfs", "", d)} \ 8 "packagegroup-tpm2-initramfs", "", d)} \
9 ${@bb.utils.contains("DISTRO_FEATURES", "ima", \ 9 ${@bb.utils.contains("DISTRO_FEATURES", "ima", \
10 "packagegroup-ima-initramfs", "", d)} \ 10 "packagegroup-ima-initramfs", "", d)} \
11 ${@bb.utils.contains("DISTRO_FEATURES", "encrypted-storage", \ 11 ${@bb.utils.contains("DISTRO_FEATURES", "luks", \
12 "packagegroup-encrypted-storage-initramfs", "", d)} \ 12 "packagegroup-luks-initramfs", "", d)} \
13" 13"
14 14
15PACKAGE_INSTALL = "\ 15PACKAGE_INSTALL = "\
diff --git a/meta/recipes-core/images/secure-core-image.inc b/meta/recipes-core/images/secure-core-image.inc
index e08b84a..0fc56fb 100644
--- a/meta/recipes-core/images/secure-core-image.inc
+++ b/meta/recipes-core/images/secure-core-image.inc
@@ -10,8 +10,8 @@ SECURE_CORE_IMAGE_EXTRA_INSTALL_append += "\
10 "packagegroup-tpm2", "", d)} \ 10 "packagegroup-tpm2", "", d)} \
11 ${@bb.utils.contains("DISTRO_FEATURES", "ima", \ 11 ${@bb.utils.contains("DISTRO_FEATURES", "ima", \
12 "packagegroup-ima", "", d)} \ 12 "packagegroup-ima", "", d)} \
13 ${@bb.utils.contains("DISTRO_FEATURES", "encrypted-storage", \ 13 ${@bb.utils.contains("DISTRO_FEATURES", "luks", \
14 "packagegroup-encrypted-storage", "", d)} \ 14 "packagegroup-luks", "", d)} \
15" 15"
16 16
17IMAGE_INSTALL = "\ 17IMAGE_INSTALL = "\