Skip to contentSkip to conversation

ima-evm-utils: Add as new package, version 1.2.1

PATCH Superseded Petr Vorel 2 participants 8 messages Jul 31, 2019 – Oct 26, 2019

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

+ add myself as a maintainer.

Adding build and install hooks to run make in src subdirectory (root directory asciidoc and xsltproc for manpage).

---
Changes v1->v2:
* Update to 1.2.1 (thus drop patch 0001-evmctl-use-correct-include-for-xattr.h.patch)
* Fix build by adding required selects (BR2_PACKAGE_OPENSSL and BR2_PACKAGE_KEYUTILS)
* Add depends on BR2_USE_MMU and !BR2_STATIC_LIBS (based on keyutils dependency)
* cleanup comments

Petr

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/ima-evm-utils/Config.in          | 11 ++++++++
 package/ima-evm-utils/ima-evm-utils.hash |  3 +++
 package/ima-evm-utils/ima-evm-utils.mk   | 32 ++++++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/ima-evm-utils/Config.in
 create mode 100644 package/ima-evm-utils/ima-evm-utils.hash
 create mode 100644 package/ima-evm-utils/ima-evm-utils.mk
DEVELOPERS +1 -0
index 05711ba678..5435a892c7 100644
@@ -1825,6 +1825,7 @@ N:	Petr Kulhavy <[email protected]>
 F:	package/linuxptp/
 
 N:	Petr Vorel <[email protected]>
+F:	package/ima-evm-utils/
 F:	package/iproute2/
 F:	package/iputils/
 F:	package/linux-backports/
package/Config.in +1 -0
index 9b2cc7522d..76f1ee1798 100644
@@ -2122,6 +2122,7 @@ endmenu
 
 menu "Security"
 	source "package/checkpolicy/Config.in"
+	source "package/ima-evm-utils/Config.in"
 	source "package/optee-benchmark/Config.in"
 	source "package/optee-client/Config.in"
 	source "package/optee-examples/Config.in"
package/ima-evm-utils/Config.in new file +11 -0
new file mode 100644
index 0000000000..7e3dcc4002
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IMA_EVM_UTILS
+	bool "ima-evm-utils"
+	depends on BR2_USE_MMU # keyutils dependency: fork()
+	depends on !BR2_STATIC_LIBS # keyutils dependency: dlopen
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_KEYUTILS
+	help
+	  Linux Integrity Measurement Architecture (IMA)
+	  Extended Verification Module (EVM) tools.
+
+	  https://sourceforge.net/p/linux-ima/wiki/Home/
package/ima-evm-utils/ima-evm-utils.hash new file +3 -0
new file mode 100644
index 0000000000..24be627d20
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 ad8471b58c4df29abd51c80d74b1501cfe3289b60d32d1b318618a8fd26c0c0a  ima-evm-utils-1.2.1.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/ima-evm-utils/ima-evm-utils.mk new file +32 -0
new file mode 100644
index 0000000000..cd15f526f6
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ima-evm-utils
+#
+################################################################################
+
+IMA_EVM_UTILS_VERSION = 1.2.1
+IMA_EVM_UTILS_SITE = http://downloads.sourceforge.net/project/linux-ima/ima-evm-utils
+IMA_EVM_UTILS_LICENSE = GPL-2.0
+IMA_EVM_UTILS_LICENSE_FILES = COPYING
+IMA_EVM_UTILS_DEPENDENCIES = host-pkgconf keyutils openssl
+
+# configure is missing but gpm seems not compatible with our autoreconf
+# mechanism so we have to do it manually instead of using IMA_EVM_UTILS_AUTORECONF = YES
+define IMA_EVM_UTILS_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+IMA_EVM_UTILS_PRE_CONFIGURE_HOOKS += IMA_EVM_UTILS_RUN_AUTOGEN
+
+# build just sources in src subdirectory as root directory requires asciidoc
+# and xsltproc for manpage
+define IMA_EVM_UTILS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) -C $(@D)/src all
+endef
+define IMA_EVM_UTILS_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D)/src install
+endef
+define IMA_EVM_UTILS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D)/src install
+endef
+
+$(eval $(autotools-package))
Signature · 1 line
2.22.0
author
#1 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

Hi,

Tested:

./utils/test-pkg -p ima-evm-utils

                             br-arm-full [1/6]: OK
                  br-arm-cortex-a9-glibc [2/6]: OK
                   br-arm-cortex-m4-full [3/6]: SKIPPED
                          br-x86-64-musl [4/6]: OK
                      br-arm-full-static [5/6]: OK
                            sourcery-arm [6/6]: OK

Kind regards,
Petr

#2 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

In reply to Petr Vorel

Petr,

Quoted 58 lines · Petr Vorel

+ add myself as a maintainer.

Adding build and install hooks to run make in src subdirectory (root directory asciidoc and xsltproc for manpage).

---
Changes v1->v2:
* Update to 1.2.1 (thus drop patch 0001-evmctl-use-correct-include-for-xattr.h.patch)
* Fix build by adding required selects (BR2_PACKAGE_OPENSSL and BR2_PACKAGE_KEYUTILS)
* Add depends on BR2_USE_MMU and !BR2_STATIC_LIBS (based on keyutils dependency)
* cleanup comments

Petr

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/ima-evm-utils/Config.in          | 11 ++++++++
 package/ima-evm-utils/ima-evm-utils.hash |  3 +++
 package/ima-evm-utils/ima-evm-utils.mk   | 32 ++++++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/ima-evm-utils/Config.in
 create mode 100644 package/ima-evm-utils/ima-evm-utils.hash
 create mode 100644 package/ima-evm-utils/ima-evm-utils.mk
DEVELOPERS +1 -0
index 05711ba678..5435a892c7 100644
@@ -1825,6 +1825,7 @@ N:        Petr Kulhavy <[email protected]>
 F:     package/linuxptp/
 
 N:     Petr Vorel <[email protected]>
+F:     package/ima-evm-utils/
 F:     package/iproute2/
 F:     package/iputils/
 F:     package/linux-backports/
package/Config.in +1 -0
index 9b2cc7522d..76f1ee1798 100644
@@ -2122,6 +2122,7 @@ endmenu
 
 menu "Security"
        source "package/checkpolicy/Config.in"
+       source "package/ima-evm-utils/Config.in"
        source "package/optee-benchmark/Config.in"
        source "package/optee-client/Config.in"
        source "package/optee-examples/Config.in"
package/ima-evm-utils/Config.in new file +0 -0
new file mode 100644
index 0000000000..7e3dcc4002

package/ima-evm-utils/Config.in line 9

Quoted 9 lines
package/ima-evm-utils/Config.in new file +9 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IMA_EVM_UTILS
+       bool "ima-evm-utils"
+       depends on BR2_USE_MMU # keyutils dependency: fork()
+       depends on !BR2_STATIC_LIBS # keyutils dependency: dlopen
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_KEYUTILS
+       help
+         Linux Integrity Measurement Architecture (IMA)
+         Extended Verification Module (EVM) tools.

Do you have a proposal for how to use these tools in an embedded environment where a filesystem needs to be "labeled/staged" offline with the signatures/hashes?

The filesystem staging might be a good run time test case as well to show the end to end use where you execute a qemu which uses the IMA tools to authenticate apps executing from a filesystem you just built.

Quoted 56 lines
package/ima-evm-utils/Config.in new file +2 -0
+
+         https://sourceforge.net/p/linux-ima/wiki/Home/
package/ima-evm-utils/ima-evm-utils.hash new file +3 -0
new file mode 100644
index 0000000000..24be627d20
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 ad8471b58c4df29abd51c80d74b1501cfe3289b60d32d1b318618a8fd26c0c0a  ima-evm-utils-1.2.1.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/ima-evm-utils/ima-evm-utils.mk new file +32 -1
new file mode 100644
index 0000000000..cd15f526f6
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ima-evm-utils
+#
+################################################################################
+
+IMA_EVM_UTILS_VERSION = 1.2.1
+IMA_EVM_UTILS_SITE = http://downloads.sourceforge.net/project/linux-ima/ima-evm-utils
+IMA_EVM_UTILS_LICENSE = GPL-2.0
+IMA_EVM_UTILS_LICENSE_FILES = COPYING
+IMA_EVM_UTILS_DEPENDENCIES = host-pkgconf keyutils openssl
+
+# configure is missing but gpm seems not compatible with our autoreconf
+# mechanism so we have to do it manually instead of using IMA_EVM_UTILS_AUTORECONF = YES
+define IMA_EVM_UTILS_RUN_AUTOGEN
+       cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+IMA_EVM_UTILS_PRE_CONFIGURE_HOOKS += IMA_EVM_UTILS_RUN_AUTOGEN
+
+# build just sources in src subdirectory as root directory requires asciidoc
+# and xsltproc for manpage
+define IMA_EVM_UTILS_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) -C $(@D)/src all
+endef
+define IMA_EVM_UTILS_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D)/src install
+endef
+define IMA_EVM_UTILS_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D)/src install
+endef
+
+$(eval $(autotools-package))
--

2.22.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 23 lines
Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.
author
#3 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

Hi Matthew,

Quoted 16 lines

package/ima-evm-utils/Config.in line 9

Quoted 11 lines

+++ b/package/ima-evm-utils/Config.in

package/ima-evm-utils/Config.in new file +9 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IMA_EVM_UTILS
+       bool "ima-evm-utils"
+       depends on BR2_USE_MMU # keyutils dependency: fork()
+       depends on !BR2_STATIC_LIBS # keyutils dependency: dlopen
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_KEYUTILS
+       help
+         Linux Integrity Measurement Architecture (IMA)
+         Extended Verification Module (EVM) tools.

Do you have a proposal for how to use these tools in an embedded environment where a filesystem needs to be "labeled/staged" offline with the signatures/hashes?

Quoted 3 lines

The filesystem staging might be a good run time test case as well to show the end to end use where you execute a qemu which uses the IMA tools to authenticate apps executing from a filesystem you just built.

Yes I was thinking about it as well. While for some usage it's handy to have it on the target, it'd be certainly helpful to offer functionality to do do labelling filesystem with security.{ima,evm} extended attributes or with digital signatures during stagging.

Kind regards,
Petr

author
#4 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

In reply to Petr Vorel

Hi,

Quoted 5 lines

+ add myself as a maintainer.

Adding build and install hooks to run make in src subdirectory (root directory asciidoc and xsltproc for manpage).

Quoted 8 lines

---
Changes v1->v2:
* Update to 1.2.1 (thus drop patch 0001-evmctl-use-correct-include-for-xattr.h.patch)
* Fix build by adding required selects (BR2_PACKAGE_OPENSSL and BR2_PACKAGE_KEYUTILS)
* Add depends on BR2_USE_MMU and !BR2_STATIC_LIBS (based on keyutils dependency)
* cleanup comments

ping, please.
https://patchwork.ozlabs.org/patch/1139978/

Kind regards,
Petr

author
#5 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

In reply to Petr Vorel

Hi,

any change this to be merged?
Or any comments, please?

Kind regards,
Petr

Quoted 115 lines

+ add myself as a maintainer.

Adding build and install hooks to run make in src subdirectory (root directory asciidoc and xsltproc for manpage).

---
Changes v1->v2:
* Update to 1.2.1 (thus drop patch 0001-evmctl-use-correct-include-for-xattr.h.patch)
* Fix build by adding required selects (BR2_PACKAGE_OPENSSL and BR2_PACKAGE_KEYUTILS)
* Add depends on BR2_USE_MMU and !BR2_STATIC_LIBS (based on keyutils dependency)
* cleanup comments

Petr

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/ima-evm-utils/Config.in          | 11 ++++++++
 package/ima-evm-utils/ima-evm-utils.hash |  3 +++
 package/ima-evm-utils/ima-evm-utils.mk   | 32 ++++++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/ima-evm-utils/Config.in
 create mode 100644 package/ima-evm-utils/ima-evm-utils.hash
 create mode 100644 package/ima-evm-utils/ima-evm-utils.mk
DEVELOPERS +1 -0
index 05711ba678..5435a892c7 100644
@@ -1825,6 +1825,7 @@ N:	Petr Kulhavy <[email protected]>
 F:	package/linuxptp/
 
 N:	Petr Vorel <[email protected]>
+F:	package/ima-evm-utils/
 F:	package/iproute2/
 F:	package/iputils/
 F:	package/linux-backports/
package/Config.in +1 -0
index 9b2cc7522d..76f1ee1798 100644
@@ -2122,6 +2122,7 @@ endmenu
 
 menu "Security"
 	source "package/checkpolicy/Config.in"
+	source "package/ima-evm-utils/Config.in"
 	source "package/optee-benchmark/Config.in"
 	source "package/optee-client/Config.in"
 	source "package/optee-examples/Config.in"
package/ima-evm-utils/Config.in new file +11 -0
new file mode 100644
index 0000000000..7e3dcc4002
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IMA_EVM_UTILS
+	bool "ima-evm-utils"
+	depends on BR2_USE_MMU # keyutils dependency: fork()
+	depends on !BR2_STATIC_LIBS # keyutils dependency: dlopen
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_KEYUTILS
+	help
+	  Linux Integrity Measurement Architecture (IMA)
+	  Extended Verification Module (EVM) tools.
+
+	  https://sourceforge.net/p/linux-ima/wiki/Home/
package/ima-evm-utils/ima-evm-utils.hash new file +3 -0
new file mode 100644
index 0000000000..24be627d20
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 ad8471b58c4df29abd51c80d74b1501cfe3289b60d32d1b318618a8fd26c0c0a  ima-evm-utils-1.2.1.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
package/ima-evm-utils/ima-evm-utils.mk new file +32 -0
new file mode 100644
index 0000000000..cd15f526f6
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ima-evm-utils
+#
+################################################################################
+
+IMA_EVM_UTILS_VERSION = 1.2.1
+IMA_EVM_UTILS_SITE = http://downloads.sourceforge.net/project/linux-ima/ima-evm-utils
+IMA_EVM_UTILS_LICENSE = GPL-2.0
+IMA_EVM_UTILS_LICENSE_FILES = COPYING
+IMA_EVM_UTILS_DEPENDENCIES = host-pkgconf keyutils openssl
+
+# configure is missing but gpm seems not compatible with our autoreconf
+# mechanism so we have to do it manually instead of using IMA_EVM_UTILS_AUTORECONF = YES
+define IMA_EVM_UTILS_RUN_AUTOGEN
+	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
+endef
+IMA_EVM_UTILS_PRE_CONFIGURE_HOOKS += IMA_EVM_UTILS_RUN_AUTOGEN
+
+# build just sources in src subdirectory as root directory requires asciidoc
+# and xsltproc for manpage
+define IMA_EVM_UTILS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) -C $(@D)/src all
+endef
+define IMA_EVM_UTILS_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D)/src install
+endef
+define IMA_EVM_UTILS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D)/src install
+endef
+
+$(eval $(autotools-package))
#6 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

In reply to Petr Vorel

Petr,

Quoted 27 lines · Petr Vorel

+ add myself as a maintainer.

Adding build and install hooks to run make in src subdirectory (root directory asciidoc and xsltproc for manpage).

---
Changes v1->v2:
* Update to 1.2.1 (thus drop patch 0001-evmctl-use-correct-include-for-xattr.h.patch)
* Fix build by adding required selects (BR2_PACKAGE_OPENSSL and BR2_PACKAGE_KEYUTILS)
* Add depends on BR2_USE_MMU and !BR2_STATIC_LIBS (based on keyutils dependency)
* cleanup comments

Petr

 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/ima-evm-utils/Config.in          | 11 ++++++++
 package/ima-evm-utils/ima-evm-utils.hash |  3 +++
 package/ima-evm-utils/ima-evm-utils.mk   | 32 ++++++++++++++++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/ima-evm-utils/Config.in
 create mode 100644 package/ima-evm-utils/ima-evm-utils.hash
 create mode 100644 package/ima-evm-utils/ima-evm-utils.mk

[snip]

Quoted 4 lines
package/ima-evm-utils/Config.in new file +1 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IMA_EVM_UTILS

package/ima-evm-utils/Config.in line 11

Quoted 10 lines
package/ima-evm-utils/Config.in new file +10 -0
+       bool "ima-evm-utils"
+       depends on BR2_USE_MMU # keyutils dependency: fork()
+       depends on !BR2_STATIC_LIBS # keyutils dependency: dlopen
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_KEYUTILS
+       help
+         Linux Integrity Measurement Architecture (IMA)
+         Extended Verification Module (EVM) tools.
+
+         https://sourceforge.net/p/linux-ima/wiki/Home/

Please add a comment like below to provide guidance when the dependencies aren't met.

comment "ima-evm-utils needs dynamic library support"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS

package/ima-evm-utils/ima-evm-utils.hash line 3

Quoted 9 lines
package/ima-evm-utils/ima-evm-utils.hash new file +3 -0
new file mode 100644
index 0000000000..24be627d20
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 ad8471b58c4df29abd51c80d74b1501cfe3289b60d32d1b318618a8fd26c0c0a  ima-evm-utils-1.2.1.tar.gz
+sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING

Suggest adding a hash for the license file.
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

Quoted 12 lines
package/ima-evm-utils/ima-evm-utils.mk new file +6 -0
new file mode 100644
index 0000000000..cd15f526f6
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ima-evm-utils
+#
+################################################################################
+

[snip]

package/ima-evm-utils/ima-evm-utils.mk line 26

Quoted 2 lines
package/ima-evm-utils/ima-evm-utils.mk new file +2 -0
+define IMA_EVM_UTILS_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D)/src install

Suggest breaking this line after $(MAKE)

package/ima-evm-utils/ima-evm-utils.mk line 30

Quoted 4 lines
package/ima-evm-utils/ima-evm-utils.mk new file +4 -0
+endef
+define IMA_EVM_UTILS_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(IMA_EVM_UTILS_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D)/src install
+endef

Suggest breaking this line after $(MAKE)

Regards,
Matt

author
#7 lore raw

PATCH v2 1/1 ima-evm-utils: Add as new package, version 1.2.1

Hi Matthew,

thanks for your comments, I'll send v2 soon.

Kind regards,
Petr