We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d92c8e8 commit 2216414Copy full SHA for 2216414
launcher/agent/agent.go
@@ -514,6 +514,16 @@ func (t *tdxAttestRoot) Attest(nonce []byte) (any, error) {
514
if err != nil {
515
return nil, err
516
}
517
+
518
+ // CCEL may contain a lot of trailing 0xFF padding bytes, trimming
519
+ // them can save bandwidth.
520
+ // Normally, the eventlog is ended with "Exit Boot Services Returned
521
+ // with Success", So it's safe to just trim all trailing "\xff".
522
+ //
523
+ // In some rare cases, where the last few bytes are actually "\xff",
524
+ // This naive trimming logic may cause the replay to fail.
525
+ ccelData = bytes.TrimRight(ccelData, "\xff")
526
527
ccelTable, err := os.ReadFile("/sys/firmware/acpi/tables/CCEL")
528
529
0 commit comments