veraison / services

Attestation verification services based on Veraison components
Apache License 2.0
24 stars 13 forks source link

chore: enable combined plugins by default #253

Closed setrofim closed 3 weeks ago

setrofim commented 3 weeks ago

Enable the building of a single, combined plugin per scheme.

Having separate plugins for different handler interfaces originally made some sense, as they were being loaded by different services (and could therefore be potentially deployed to different systems).

Since 20277644, all interfaces are loaded by the VTS, so having separate plugins for them no longer makes any sense.

Other reasons to combine plugins:

    0m11.876s
    0m11.854s
    0m11.883s
    $ stat -c "%s %n" scheme/bin/* | numfmt --to iec
    22M scheme/bin/arm-cca-endorsement-handler.plugin
    22M scheme/bin/arm-cca-evidence-handler.plugin
    21M scheme/bin/arm-cca-store-handler.plugin
    22M scheme/bin/parsec-cca-endorsement-handler.plugin
    22M scheme/bin/parsec-cca-evidence-handler.plugin
    21M scheme/bin/parsec-cca-store-handler.plugin
    22M scheme/bin/parsec-tpm-endorsement-handler.plugin
    22M scheme/bin/parsec-tpm-evidence-handler.plugin
    21M scheme/bin/parsec-tpm-store-handler.plugin
    22M scheme/bin/psa-endorsement-handler.plugin
    22M scheme/bin/psa-evidence-handler.plugin
    21M scheme/bin/psa-store-handler.plugin
    20M scheme/bin/riot.plugin
    21M scheme/bin/tcg-dice-evidence-handler.plugin
    22M scheme/bin/tpm-enacttrust-endorsement-handler.plugin
    22M scheme/bin/tpm-enacttrust-evidence-handler.plugin
    21M scheme/bin/tpm-enacttrust-store-handler.plugin

and with combined plugins:

    $ stat -c "%s %n" scheme/bin/* | numfmt --to iec
    23M scheme/bin/arm-cca.plugin
    23M scheme/bin/parsec-cca.plugin
    23M scheme/bin/parsec-tpm.plugin
    23M scheme/bin/psa.plugin
    21M scheme/bin/riot.plugin
    23M scheme/bin/tpm-enacttrust.plugin

actual scheme code only take up ~1-3M of the binary, with ~20M being Go runtime.