Skip to contentSkip to conversation

ima-evm-utils: When using the IBM TSS, link in its library

PATCH In review Ken Goldman 2 participants 5 messages Oct 5, 2020 – Oct 7, 2020 Keys-trusted

lore
Share & tools
lore
#0 lore raw

PATCH 3/6 ima-evm-utils: When using the IBM TSS, link in its library

This is a prerequisite for the code change that uses the TSS rather than the command line tools.

---
 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)
src/Makefile.am +1 -0
index d6c779f..bf18caf 100644
@@ -26,6 +26,7 @@ if USE_PCRTSS
 evmctl_SOURCES += pcr_tss.c
 else
 evmctl_SOURCES += pcr_tsspcrread.c
+evmctl_LDADD += -libmtss
 endif
 
 AM_CPPFLAGS = -I$(top_srcdir) -include config.h
Signature · 1 line
2.25.1
#1 lore raw

Hi Ken,

Quoted 13 lines

This is a prerequisite for the code change that uses the TSS rather than the command line tools.

---
 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)
src/Makefile.am +0 -0
index d6c779f..bf18caf 100644

src/Makefile.am if USE_PCRTSS · line 30

Quoted 5 lines
src/Makefile.am +1 -0
@@ -26,6 +26,7 @@ if USE_PCRTSS
 evmctl_SOURCES += pcr_tss.c
 else
 evmctl_SOURCES += pcr_tsspcrread.c
+evmctl_LDADD += -libmtss
 endif

But pcr_tsspcrread.c uses the binary (tsspcrread).

pcr_tss.c uses TSS, but that's already covered:
ldd src/.libs/evmctl |grep tss

	libtss2-rc.so.0 => /usr/lib64/libtss2-rc.so.0 (0x00007fb82514c000)
	libtss2-esys.so.0 => /usr/lib64/libtss2-esys.so.0 (0x00007fb824eba000)
	libtss2-sys.so.0 => /usr/lib64/libtss2-sys.so.0 (0x00007fb8244ba000)
	libtss2-mu.so.0 => /usr/lib64/libtss2-mu.so.0 (0x00007fb824276000)

Thus I thing this patch is invalid. Or do I miss something obvious?

And other thing: could you please rebase your patches for next-testing branch? It's not applicable for master, next and next-testing.

Kind regards,
Petr

#2 lore raw
Quoted 10 lines · Petr Vorel

Hi Ken,

Quoted 7 lines

This is a prerequisite for the code change that uses the TSS rather than the command line tools.

---
  src/Makefile.am | 1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

src/Makefile.am if USE_PCRTSS · line 30

Quoted 10 lines
src/Makefile.am +1 -0
index d6c779f..bf18caf 100644
@@ -26,6 +26,7 @@ if USE_PCRTSS
  evmctl_SOURCES += pcr_tss.c
  else
  evmctl_SOURCES += pcr_tsspcrread.c
+evmctl_LDADD += -libmtss
  endif

But pcr_tsspcrread.c uses the binary (tsspcrread).

The idea is to eliminate the calls to command line utilities, which are not as stable as the TSS library. Patch 4/6 does that.

I'm a git newbie. I thought the idea was to do the patches as small pieces. Thus, this one does the autotools piece. Then the next one does the C code. Should they be combined?

Quoted 9 lines

pcr_tss.c uses TSS, but that's already covered:
ldd src/.libs/evmctl |grep tss

	libtss2-rc.so.0 => /usr/lib64/libtss2-rc.so.0 (0x00007fb82514c000)
	libtss2-esys.so.0 => /usr/lib64/libtss2-esys.so.0 (0x00007fb824eba000)
	libtss2-sys.so.0 => /usr/lib64/libtss2-sys.so.0 (0x00007fb8244ba000)
	libtss2-mu.so.0 => /usr/lib64/libtss2-mu.so.0 (0x00007fb824276000)

Thus I thing this patch is invalid. Or do I miss something obvious?

There are two TSSes. This one's for the IBM TSS. Your traces are for the ESAPI API (aka Intel TSS).

Quoted 7 lines

And other thing: could you please rebase your patches for next-testing branch? It's not applicable for master, next and next-testing.

Kind regards,
Petr

#3 lore raw
In reply to Petr Vorel
Quoted 10 lines · Petr Vorel

Hi Ken,

Quoted 7 lines

This is a prerequisite for the code change that uses the TSS rather than the command line tools.

---
  src/Makefile.am | 1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

src/Makefile.am if USE_PCRTSS · line 30

Quoted 10 lines
src/Makefile.am +1 -0
index d6c779f..bf18caf 100644
@@ -26,6 +26,7 @@ if USE_PCRTSS
  evmctl_SOURCES += pcr_tss.c
  else
  evmctl_SOURCES += pcr_tsspcrread.c
+evmctl_LDADD += -libmtss
  endif

But pcr_tsspcrread.c uses the binary (tsspcrread).

The idea is to eliminate the calls to command line utilities that are not as stable as the TSS library. Patch 4/6 does that.

I'm a git newbie. I thought the idea was to do the patches as small pieces. Thus, this one does the autotools piece. Then the next one does the C code. Should they be combined?

Quoted 9 lines

pcr_tss.c uses TSS, but that's already covered:
ldd src/.libs/evmctl |grep tss

	libtss2-rc.so.0 => /usr/lib64/libtss2-rc.so.0 (0x00007fb82514c000)
	libtss2-esys.so.0 => /usr/lib64/libtss2-esys.so.0 (0x00007fb824eba000)
	libtss2-sys.so.0 => /usr/lib64/libtss2-sys.so.0 (0x00007fb8244ba000)
	libtss2-mu.so.0 => /usr/lib64/libtss2-mu.so.0 (0x00007fb824276000)

Thus I thing this patch is invalid. Or do I miss something obvious?

There are two TSSes. This one's for the IBM TSS. Your traces are for the ESAPI (aka

Quoted 7 lines

And other thing: could you please rebase your patches for next-testing branch? It's not applicable for master, next and next-testing.

Kind regards,
Petr

#4 lore raw

Hi Ken,

...

Quoted 12 lines
Quoted 11 lines

src/Makefile.am if USE_PCRTSS · line 30

Quoted 10 lines
src/Makefile.am +1 -0
index d6c779f..bf18caf 100644
@@ -26,6 +26,7 @@ if USE_PCRTSS
  evmctl_SOURCES += pcr_tss.c
  else
  evmctl_SOURCES += pcr_tsspcrread.c
+evmctl_LDADD += -libmtss
  endif

But pcr_tsspcrread.c uses the binary (tsspcrread).

Quoted 2 lines

The idea is to eliminate the calls to command line utilities that are not as stable as the TSS library. Patch 4/6 does that.

I'm sorry, I overlooked that.

Quoted 3 lines

I'm a git newbie. I thought the idea was to do the patches as small pieces. Thus, this one does the autotools piece. Then the next one does the C code. Should they be combined?

I'd personally put it into the 4/6 patch (code change is small and it's related to the code change).

Quoted 11 lines
Quoted 8 lines

pcr_tss.c uses TSS, but that's already covered:
ldd src/.libs/evmctl |grep tss

	libtss2-rc.so.0 => /usr/lib64/libtss2-rc.so.0 (0x00007fb82514c000)
	libtss2-esys.so.0 => /usr/lib64/libtss2-esys.so.0 (0x00007fb824eba000)
	libtss2-sys.so.0 => /usr/lib64/libtss2-sys.so.0 (0x00007fb8244ba000)
	libtss2-mu.so.0 => /usr/lib64/libtss2-mu.so.0 (0x00007fb824276000)

Thus I thing this patch is invalid. Or do I miss something obvious?

There are two TSSes. This one's for the IBM TSS. Your traces are for the ESAPI (aka

Thanks for explanation.

Kind regards,
Petr