Hello -
Attached is a patch against version 1.9.6 that fixes this problem.
The stm_elt now registers itself as "stm" instead of the conflicting
"mle".
Cheers,
Curt
On Wed Aug 30 08:35, Curt Brune wrote:
> Hello,
>
> I am using version 1.9.5 and working my way through the documentation
> in tboot-1.9.5/lcptools-v2/lcptools.txt.
>
> I am hitting a snag trying to follow the instructions there, creating
> a mle policy element.
>
> The first step works fine:
>
> linux:~$ lcp2_mlehash --create --cmdline "$TBOOT_CMDLINE" --alg sha1
> /boot/tboot.gz > mle_hash
>
> Creating the policy element fails:
>
> linux:~$ lcp2_crtpolelt --create --type mle --ctrl 0x00 --minver 17 --alg
> sha1 --out mle.elt mle_hash
> Error: unknown option for mle type
>
> Looking at the help I see that two different policy element plugins
> are using the same type string "mle":
>
> linux:~$ lcp2_crtpolelt --help
> [snip]
> types :
> mle
> [--alg <sha1|sha256|sha384|sha512>] hash alg of element
> <FILE1> [FILE2] ... one or more files containing STM
> hash(es); each file can contain
> multiple hashes
> [snip]
> mle
> [--minver <ver>] minimum version of SINIT
> [--alg <sha1|sha256|sha384|sha512>] hash alg of element
> <FILE1> [FILE2] ... one or more files containing MLE
> hash(es); each file can contain
> multiple hashes
>
> Looking at the code I see that tboot-1.9.5/lcptools-v2/mle_elt.c and
> tboot-1.9.5/lcptools-v2/stm_elt.c both define a plugin of type "mle".
> That seems to be the problem.
>
> Looking at version 1.9.6 has the same problem.
>
> Am I missing something?
>
> Cheers,
> Curt
Author: Curt Brune <c...@cumulusnetworks.com>
Date: Fri Sep 1 08:06:39 2017 -0700
Make policy element stm_elt use unique type name
The stm_elt policy element plugin registers as type "mle" which
conflicts with the mle_elt policy plugin that also registers as type
"mle".
The plugin architecture uses C constructors to register plugins within
the framework. When multiple compilation units use constructors, the
order in which the constructors are called is somewhat arbitrary. It
depends on the compiler and the dynamic loader.
This patch registers the stm_elt as type "stm", which looks to have
been the original intent.
Signed-off-by: Curt Brune <c...@cumulusnetworks.com>
diff --git a/lcptools-v2/stm_elt.c b/lcptools-v2/stm_elt.c
index 43a64dd..f91fa30 100644
--- a/lcptools-v2/stm_elt.c
+++ b/lcptools-v2/stm_elt.c
@@ -132,9 +132,9 @@ static struct option opts[] = {
};
static polelt_plugin_t plugin = {
- "mle",
+ "stm",
opts,
- " mle\n"
+ " stm\n"
" [--alg <sha1|sha256|sha384|sha512>] hash alg of element\n"
" <FILE1> [FILE2] ... one or more files containing STM\n"
" hash(es); each file can contain\n"
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel