Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions extract/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ func GMESState(hash crypto.Hash, events []tcg.Event) (*pb.GMESState, error) {
state := &pb.GMESState{}
seenSeparators := map[uint32]bool{
gmes.PCRConfig.BMCFirmwareIdx: false,
gmes.PCRConfig.MBMIdx: false,
gmes.PCRConfig.BIOSIdx: false,
gmes.PCRConfig.HostKernelIdx: false,
}
Expand Down Expand Up @@ -587,9 +586,6 @@ func GMESState(hash crypto.Hash, events []tcg.Event) (*pb.GMESState, error) {
return nil, fmt.Errorf("failed parsing EFI image load at host kernel event %d: %v", event.Num(), err)
}

case registerCfg.MBMIdx:
continue

default:
return nil, fmt.Errorf("unknown MR index: %d", event.MRIndex())
}
Expand Down
6 changes: 0 additions & 6 deletions extract/extract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ func TestGMESState(t *testing.T) {
newSeparatorEvent(t, gmes.PCRConfig.BMCFirmwareIdx),
newSeparatorEvent(t, gmes.PCRConfig.BIOSIdx),
newSeparatorEvent(t, gmes.PCRConfig.HostKernelIdx),
newSeparatorEvent(t, gmes.PCRConfig.MBMIdx),
}

bmcEvent := newEvent(t, gmes.PCRConfig.BMCFirmwareIdx, tcg.EFIHCRTMEvent, []byte(gmes.BMCData))
Expand All @@ -693,8 +692,6 @@ func TestGMESState(t *testing.T) {
bmcEvent,
biosEvent,
kernelEvent,
// MBM data is not captured in GMESState but we should ensure it's handled correctly.
newEvent(t, gmes.PCRConfig.MBMIdx, tcg.EventTag, []byte("please ignore me!")),
}, separatorEvents...)

// We need to ensure events are replayed correctly.
Expand All @@ -721,15 +718,12 @@ func TestGMESStateErrors(t *testing.T) {
newSeparatorEvent(t, gmes.PCRConfig.BMCFirmwareIdx),
newSeparatorEvent(t, gmes.PCRConfig.BIOSIdx),
newSeparatorEvent(t, gmes.PCRConfig.HostKernelIdx),
newSeparatorEvent(t, gmes.PCRConfig.MBMIdx),
}

validEvents := append([]tcg.Event{
newEvent(t, gmes.PCRConfig.BMCFirmwareIdx, tcg.EFIHCRTMEvent, []byte(gmes.BMCData)),
newEvent(t, gmes.PCRConfig.BIOSIdx, tcg.GoogleDRTMEvent, []byte(gmes.BIOSData)),
newEFIImageLoadEvent(t, gmes.PCRConfig.HostKernelIdx, 0x1000, 0x2000, 0x3000, []byte("test-dev-path")),
// MBM data is not captured in GMESState but we should ensure it's handled correctly.
newEvent(t, gmes.PCRConfig.MBMIdx, tcg.EventTag, []byte("please ignore me!")),
}, separatorEvents...)

testcases := []struct {
Expand Down
2 changes: 0 additions & 2 deletions extract/gmes/gmes.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ const (

type registerConfig struct {
BMCFirmwareIdx uint32
MBMIdx uint32
BIOSIdx uint32
HostKernelIdx uint32
}

// PCRConfig configures the expected PCR indexes for GMES event logs.
var PCRConfig = registerConfig{
BMCFirmwareIdx: 0,
MBMIdx: 11,
BIOSIdx: 17,
HostKernelIdx: 21,
}
Loading