Closed yufeng-wr closed 3 years ago
Merging #125 into master will increase coverage by
1.17%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #125 +/- ##
=========================================
+ Coverage 67.43% 68.6% +1.17%
=========================================
Files 9 9
Lines 1176 1239 +63
=========================================
+ Hits 793 850 +57
- Misses 383 389 +6
Impacted Files | Coverage Δ | |
---|---|---|
src/tpm2-tss-engine-tcti.c | 56.19% <ø> (ø) |
:arrow_up: |
src/tpm2-tss-engine-ecc.c | 68.68% <0%> (+6.29%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0bd2b64...8571051. Read the comment docs.
Is there any update for this review?
IMO, this patch is too narrow. Instead the whole engine-control should be deactivated instead and I guess the complete -tcti.c file excluded from build. I mean, what purpose does the engine-crtl serve, if there is no backing code ?
Good suggestion. How about create a new file tpm2-tss-engine-static-tcti.c? It will use the tcti static library.
The uestion is, whether we want to statically set a TCTI for the engine here, or whether we just want to rely on ESYS to set a static TCTI correctly ?
The engine should rely on ESYS to set a static TCTI by default. Should we consider the different TCTI configuration or not? If yes, the dynamic and static libraries should be considered also.
Since you're the only user of NO_DL at this moment: You tell me, if you need a TCTI-ctrl for static.
In either case, the current TCTI-ctrl needs should be disabled alltogether for no-dynamic builds and I guess the complete file tpm2-tss-engine-tcti.c should be excluded from the build.
It should take a configure-flag as well, I guess.
The ESYS default configuration is enough for me. It can work with VxWorks. tpm2-tss-engine-tcti.c includes some public APIs, such as tcti_clear_opts() and tcti_set_opts(). Currently, it can't be removed for no-dynamic builds. In addition, some functions in other .c files need to be modified (i.e esys_auxctx_init(), esys_auxctx_free().) It seems the ESYS initializing and finalizing processes need to be redesigned.
Hmpf... sounds like it... :-(
We may run into a redesign of this anyways with the tss2-tctildr.so library appearing on tpm2-tss. Thus, I guess we can postpone this until that library is available upstream.
Seems stalled. So closing.
tctildr is a thing now though, so might make this whole PR much simpler.
If defined NO_DL, the engine will not support using the tcti shared library. Some system such as VxWorks builds the tcti as static library and links with OS image together. In this situation, shared library is not supported and should be removed from engine.