diff --git a/extract/extract.go b/extract/extract.go index 87f6a1d..d2ebf21 100644 --- a/extract/extract.go +++ b/extract/extract.go @@ -22,6 +22,7 @@ import ( "errors" "fmt" + gmes "github.com/google/go-eventlog/extract/gmes" pb "github.com/google/go-eventlog/proto/state" "github.com/google/go-eventlog/tcg" "github.com/google/go-eventlog/wellknown" @@ -514,3 +515,112 @@ func getGrubKernelCmdlineSuffix(grubCmd []byte) int { } return -1 } + +// GMESState extracts Google Measurement Event Structure (GMES) information from a TCG event log. +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, + } + + for _, event := range events { + eventType, err := tcg.UntrustedParseEventType(uint32(event.UntrustedType())) + if err != nil { + return nil, err + } + + // Handle separator types. + if eventType == tcg.Separator { + seen, ok := seenSeparators[event.MRIndex()] + if !ok { // Skip if not a GMES index. + continue + } + + if seen { + return nil, fmt.Errorf("duplicate separator event at MR%d", event.MRIndex()) + } + + separatorInfo := getSeparatorInfo(hash) + isSeparator, err := checkIfValidSeparator(event, separatorInfo) + if err != nil { + return nil, fmt.Errorf("error checking for valid separator: %v", err) + } + + if !isSeparator { + return nil, fmt.Errorf("event contains separator type but not separator content %d", event.Num()) + } + + seenSeparators[event.MRIndex()] = true + continue + } + + if seen, ok := seenSeparators[event.MRIndex()]; ok && seen { + // Don't trust any events for the index after separator. + continue + } + + if eventType != tcg.EventTag { + // Ignore non-Tag events since GMES events are expected to be in Tag format. + continue + } + + // Verify event digest matches event data. + if err := DigestEquals(event, event.RawData()); err != nil { + return nil, fmt.Errorf("invalid digest at event %d: %v", event.Num(), err) + } + + // Parse PCCClient Tagged Event from event data. + taggedEvent, err := tcg.ParseTaggedEventData(event.RawData()) + if err != nil { + return nil, fmt.Errorf("failed to parse PCCClient Tagged Event at event %d: %v", event.Num(), err) + } + + if taggedEvent.ID != gmes.EventID { + return nil, fmt.Errorf("unexpected event ID at event %d: %v", event.Num(), taggedEvent.ID) + } + + // Parse Google Measurement Event Structure. + gmesEvent, err := gmes.ParseEvent(taggedEvent.Data) + if err != nil { + return nil, err + } + + registerCfg := gmes.PCRConfig + // TODO: switch to real measurement tag config once we have a suitable event log. + tagCfg := gmes.MeasurementTagConfig + + switch event.MRIndex() { + case registerCfg.BMCFirmwareIdx: + if gmesEvent.Tag != tagCfg.BMCFirmware { + return nil, fmt.Errorf("unexpected measurement tag at event %d: %v", event.Num(), gmesEvent.Tag) + } + state.BmcFirmware = string(gmesEvent.Content) + + case registerCfg.MBMIdx: + if gmesEvent.Tag != tagCfg.MBM { + return nil, fmt.Errorf("unexpected measurement tag at event %d: %v", event.Num(), gmesEvent.Tag) + } + state.Mbm = string(gmesEvent.Content) + + case registerCfg.BIOSIdx: + if gmesEvent.Tag != tagCfg.BIOS { + return nil, fmt.Errorf("unexpected measurement tag at event %d: %v", event.Num(), gmesEvent.Tag) + } + state.Bios = string(gmesEvent.Content) + + case registerCfg.HostKernelIdx: + if gmesEvent.Tag != tagCfg.HostKernel { + return nil, fmt.Errorf("unexpected measurement tag at event %d: %v", event.Num(), gmesEvent.Tag) + } + state.HostKernel = string(gmesEvent.Content) + + default: + return nil, fmt.Errorf("unknown MR index: %d", event.MRIndex()) + } + } + + return state, nil +} diff --git a/extract/extract_test.go b/extract/extract_test.go index a4baa7d..11ac8b8 100644 --- a/extract/extract_test.go +++ b/extract/extract_test.go @@ -18,12 +18,17 @@ import ( "bytes" "crypto" "crypto/rand" + "crypto/sha256" + "encoding/binary" "encoding/hex" "math/big" "os" "strings" "testing" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + gmes "github.com/google/go-eventlog/extract/gmes" "github.com/google/go-eventlog/internal/testutil" "github.com/google/go-eventlog/register" "github.com/google/go-eventlog/tcg" @@ -671,3 +676,181 @@ func decodeHex(hexStr string) []byte { } return bytes } + +func TestGMESState(t *testing.T) { + expectedState := &pb.GMESState{ + Bios: "TestBIOS", + Mbm: "TestMBM", + BmcFirmware: "TestBMC", + HostKernel: "TestKernel", + } + + validEvents := []tcg.Event{ + newGMESEvent(t, gmes.PCRConfig.BIOSIdx, gmes.MeasurementTagConfig.BIOS, expectedState.Bios), + newSeparatorEvent(t, gmes.PCRConfig.BIOSIdx), + newGMESEvent(t, gmes.PCRConfig.MBMIdx, gmes.MeasurementTagConfig.MBM, expectedState.Mbm), + newSeparatorEvent(t, gmes.PCRConfig.MBMIdx), + newGMESEvent(t, gmes.PCRConfig.BMCFirmwareIdx, gmes.MeasurementTagConfig.BMCFirmware, expectedState.BmcFirmware), + newSeparatorEvent(t, gmes.PCRConfig.BMCFirmwareIdx), + newGMESEvent(t, gmes.PCRConfig.HostKernelIdx, gmes.MeasurementTagConfig.HostKernel, expectedState.HostKernel), + newSeparatorEvent(t, gmes.PCRConfig.HostKernelIdx), + } + + testcases := []struct { + name string + events []tcg.Event + expectedState *pb.GMESState + }{ + { + name: "valid events", + events: validEvents, + expectedState: expectedState, + }, + { + name: "duplicate separator", + events: append(validEvents, newSeparatorEvent(t, gmes.PCRConfig.HostKernelIdx)), + expectedState: nil, // Expect failure. + }, + { + name: "invalid tag", + events: []tcg.Event{newGMESEvent(t, gmes.PCRConfig.BIOSIdx, 9999, "InvalidTag")}, + expectedState: nil, // Expect failure. + }, + { + name: "event after separator ignored", + events: append(validEvents, newGMESEvent(t, gmes.PCRConfig.HostKernelIdx, gmes.MeasurementTagConfig.HostKernel, "ModifiedKernel")), + expectedState: expectedState, // Should ignore the modified event after the separator. + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + gotState, err := GMESState(crypto.SHA256, getEventsFromLog(t, tc.events)) + + if (err != nil) != (tc.expectedState == nil) { + t.Fatalf("GMESState() error = %v, wantErr: %v", err, tc.expectedState == nil) + } + + if tc.expectedState != nil && !cmp.Equal(gotState, tc.expectedState, cmpopts.IgnoreUnexported(pb.GMESState{})) { + t.Errorf("GMESState() = got %+v, want %+v", gotState, tc.expectedState) + } + }) + } +} + +// encodeGMESEventData packages content into the Google Measurement Event Structure +// and wraps it in a TCG Tagged Event structure. +func encodeGMESEventData(t *testing.T, tag uint32, content []byte) []byte { + t.Helper() + // Create GMES MeasurementEvent data + gmesBuf := new(bytes.Buffer) + binary.Write(gmesBuf, binary.LittleEndian, uint32(1)) // Version + binary.Write(gmesBuf, binary.LittleEndian, tag) // Tag + binary.Write(gmesBuf, binary.LittleEndian, uint32(len(content))) // Size + gmesBuf.Write(content) + gmesData := gmesBuf.Bytes() + + // Wrap in TCG_PCClientTaggedEventStruct + taggedBuf := new(bytes.Buffer) + binary.Write(taggedBuf, binary.LittleEndian, gmes.EventID) // ID + binary.Write(taggedBuf, binary.LittleEndian, uint32(len(gmesData))) // DataLen + taggedBuf.Write(gmesData) + + return taggedBuf.Bytes() +} + +// newGMESEvent creates a tcg.Event containing a GMES measurement. +func newGMESEvent(t *testing.T, mrIndex uint32, tag uint32, content string) tcg.Event { + t.Helper() + data := encodeGMESEventData(t, tag, []byte(content)) + digest := sha256.Sum256(data) + return tcg.Event{ + Index: int(mrIndex), + Type: tcg.EventTag, + Data: data, + Digest: digest[:], + } +} + +// newSeparatorEvent creates a tcg.Separator event for the given MR index. +func newSeparatorEvent(t *testing.T, mrIndex uint32) tcg.Event { + t.Helper() + data := []byte{0, 0, 0, 0} + digest := sha256.Sum256(data) + return tcg.Event{ + Index: int(mrIndex), + Type: tcg.Separator, + Data: data, + Digest: digest[:], + } +} + +// getEventsFromLog takes a slice of events and returns a slice of verified events +// by building a synthetic raw event log and replaying it. +func getEventsFromLog(t *testing.T, events []tcg.Event) []tcg.Event { + t.Helper() + + buf := new(bytes.Buffer) + // Spec ID event (SHA1 format) + binary.Write(buf, binary.LittleEndian, uint32(0)) // PCRIndex + binary.Write(buf, binary.LittleEndian, uint32(0x03)) // Type: NoAction + binary.Write(buf, binary.LittleEndian, [20]byte{}) // Digest + + specIDBuf := new(bytes.Buffer) + // "Spec ID Event03\0" + binary.Write(specIDBuf, binary.LittleEndian, [16]byte{0x53, 0x70, 0x65, 0x63, 0x20, 0x49, 0x44, 0x20, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x33, 0x00}) + binary.Write(specIDBuf, binary.LittleEndian, uint32(0)) // PlatformClass + binary.Write(specIDBuf, binary.LittleEndian, uint8(0)) // VersionMinor + binary.Write(specIDBuf, binary.LittleEndian, uint8(2)) // VersionMajor + binary.Write(specIDBuf, binary.LittleEndian, uint8(0)) // Errata + binary.Write(specIDBuf, binary.LittleEndian, uint8(8)) // UintnSize + binary.Write(specIDBuf, binary.LittleEndian, uint32(1)) // NumAlgs + binary.Write(specIDBuf, binary.LittleEndian, uint16(0x000B)) // SHA256 ID + binary.Write(specIDBuf, binary.LittleEndian, uint16(32)) // SHA256 Size + binary.Write(specIDBuf, binary.LittleEndian, uint8(0)) // VendorInfoSize + + specIDData := specIDBuf.Bytes() + binary.Write(buf, binary.LittleEndian, uint32(len(specIDData))) + buf.Write(specIDData) + + // Subsequent events (TPM 2.0 format) + for _, e := range events { + binary.Write(buf, binary.LittleEndian, uint32(e.Index)) + binary.Write(buf, binary.LittleEndian, uint32(e.Type)) + binary.Write(buf, binary.LittleEndian, uint32(1)) // NumDigests + binary.Write(buf, binary.LittleEndian, uint16(0x000B)) // SHA256 + buf.Write(e.Digest) + binary.Write(buf, binary.LittleEndian, uint32(len(e.Data))) + buf.Write(e.Data) + } + + rawLog := buf.Bytes() + + // Calculate PCRs for replay. + pcrValues := make(map[int][]byte) + for _, e := range events { + h := sha256.New() + if current, ok := pcrValues[e.Index]; ok { + h.Write(current) + } else { + // First event for this PCR - initialize with zeros. + initial := make([]byte, h.Size()) + h.Write(initial) + } + h.Write(e.Digest) + pcrValues[e.Index] = h.Sum(nil) + } + + pcrMap := make(map[uint32][]byte) + for idx, val := range pcrValues { + pcrMap[uint32(idx)] = val[:] + } + bank := testutil.MakePCRBank(pb.HashAlgo_SHA256, pcrMap) + + // Parse and Replay to get events. + replayedEvents, err := tcg.ParseAndReplay(rawLog, bank.MRs(), tcg.ParseOpts{}) + if err != nil { + t.Fatalf("failed to parse synthetic log: %v", err) + } + return replayedEvents +} diff --git a/extract/gmes/gmes.go b/extract/gmes/gmes.go new file mode 100644 index 0000000..e30ff54 --- /dev/null +++ b/extract/gmes/gmes.go @@ -0,0 +1,89 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +// Package gmes has configs for extracting information from Google measurements. +package gmes + +import ( + "bytes" + "encoding/binary" + "fmt" +) + +// MeasurementEvent represents the structure of a Google measurement event. +type MeasurementEvent struct { + Version uint32 + Tag uint32 + Size uint32 + Content []byte +} + +type registerConfig struct { + BMCFirmwareIdx uint32 + MBMIdx uint32 + BIOSIdx uint32 + HostKernelIdx uint32 +} + +type measurementTagConfig struct { + BMCFirmware uint32 + MBM uint32 + HostKernel uint32 + BIOS uint32 +} + +// PCRConfig configures the expected PCR indexes for GMES event logs. +var PCRConfig = registerConfig{ + BMCFirmwareIdx: 0, + MBMIdx: 11, + BIOSIdx: 17, + HostKernelIdx: 21, +} + +// MeasurementTagConfig configures the expected measurement tags for GMES events. +var MeasurementTagConfig = measurementTagConfig{ + BMCFirmware: 1, + BIOS: 2, + HostKernel: 3, + MBM: 4, +} + +// EventID is the expected event ID for GMES events. +var EventID uint32 = 0x474D4553 + +// ParseEvent parses a GMES event from the given data. +func ParseEvent(eventdata []byte) (*MeasurementEvent, error) { + r := bytes.NewReader(eventdata) + + measurement := &MeasurementEvent{} + + if err := binary.Read(r, binary.LittleEndian, &measurement.Version); err != nil { + return nil, fmt.Errorf("failed to parse measurement version: %v", err) + } + + if err := binary.Read(r, binary.LittleEndian, &measurement.Tag); err != nil { + return nil, fmt.Errorf("failed to parse measurement tag: %v", err) + } + + if err := binary.Read(r, binary.LittleEndian, &measurement.Size); err != nil { + return nil, fmt.Errorf("failed to parse measurement size: %v", err) + } + + measurement.Content = make([]byte, measurement.Size) + if _, err := r.Read(measurement.Content); err != nil { + return nil, fmt.Errorf("failed to parse measurement content: %v", err) + } + + return measurement, nil +} diff --git a/proto/state.proto b/proto/state.proto index 1e86af7..742d64e 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -220,3 +220,10 @@ message FirmwareLogState { LogType log_type = 9; } +// The verified state of Google measurements on the machine. +message GMESState { + string bmc_firmware = 1; + string bios = 2; + string host_kernel = 3; + string mbm = 4; +} diff --git a/proto/state/state.pb.go b/proto/state/state.pb.go index 0d6d44f..84ebd75 100644 --- a/proto/state/state.pb.go +++ b/proto/state/state.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v3.21.12 +// protoc v3.14.0 // source: state.proto package state @@ -1177,6 +1177,78 @@ func (x *FirmwareLogState) GetLogType() LogType { return LogType_LOG_TYPE_UNDEFINED } +// The verified state of Google measurements on the machine. +type GMESState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BmcFirmware string `protobuf:"bytes,1,opt,name=bmc_firmware,json=bmcFirmware,proto3" json:"bmc_firmware,omitempty"` + Bios string `protobuf:"bytes,2,opt,name=bios,proto3" json:"bios,omitempty"` + HostKernel string `protobuf:"bytes,3,opt,name=host_kernel,json=hostKernel,proto3" json:"host_kernel,omitempty"` + Mbm string `protobuf:"bytes,4,opt,name=mbm,proto3" json:"mbm,omitempty"` +} + +func (x *GMESState) Reset() { + *x = GMESState{} + if protoimpl.UnsafeEnabled { + mi := &file_state_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GMESState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GMESState) ProtoMessage() {} + +func (x *GMESState) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GMESState.ProtoReflect.Descriptor instead. +func (*GMESState) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{12} +} + +func (x *GMESState) GetBmcFirmware() string { + if x != nil { + return x.BmcFirmware + } + return "" +} + +func (x *GMESState) GetBios() string { + if x != nil { + return x.Bios + } + return "" +} + +func (x *GMESState) GetHostKernel() string { + if x != nil { + return x.HostKernel + } + return "" +} + +func (x *GMESState) GetMbm() string { + if x != nil { + return x.Mbm + } + return "" +} + var File_state_proto protoreflect.FileDescriptor var file_state_proto_rawDesc = []byte{ @@ -1295,36 +1367,43 @@ var file_state_proto_rawDesc = []byte{ 0x66, 0x69, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x03, 0x65, 0x66, 0x69, 0x12, 0x29, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, - 0x6c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x2a, 0x45, 0x0a, - 0x07, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x47, - 0x32, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x43, 0x43, 0x10, 0x02, 0x2a, 0x62, 0x0a, 0x19, 0x47, 0x43, 0x45, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41, - 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x56, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x4d, 0x44, 0x5f, - 0x53, 0x45, 0x56, 0x5f, 0x45, 0x53, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x54, 0x45, - 0x4c, 0x5f, 0x54, 0x44, 0x58, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x4d, 0x44, 0x5f, 0x53, - 0x45, 0x56, 0x5f, 0x53, 0x4e, 0x50, 0x10, 0x04, 0x2a, 0x96, 0x01, 0x0a, 0x14, 0x57, 0x65, 0x6c, - 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, - 0x0a, 0x18, 0x4d, 0x53, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x53, 0x5f, 0x50, 0x52, 0x4f, - 0x44, 0x5f, 0x50, 0x43, 0x41, 0x5f, 0x32, 0x30, 0x31, 0x31, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, - 0x4d, 0x53, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x55, - 0x45, 0x46, 0x49, 0x5f, 0x43, 0x41, 0x5f, 0x32, 0x30, 0x31, 0x31, 0x10, 0x02, 0x12, 0x1e, 0x0a, - 0x1a, 0x4d, 0x53, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, - 0x4b, 0x45, 0x4b, 0x5f, 0x43, 0x41, 0x5f, 0x32, 0x30, 0x31, 0x31, 0x10, 0x03, 0x12, 0x12, 0x0a, - 0x0e, 0x47, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x4b, 0x10, - 0x04, 0x2a, 0x4a, 0x0a, 0x08, 0x48, 0x61, 0x73, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x10, 0x0a, - 0x0c, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, - 0x08, 0x0a, 0x04, 0x53, 0x48, 0x41, 0x31, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, - 0x0c, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x0d, 0x42, 0x2b, 0x5a, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x75, 0x0a, + 0x09, 0x47, 0x4d, 0x45, 0x53, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6d, + 0x63, 0x5f, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x62, 0x6d, 0x63, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x69, 0x6f, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x4b, 0x65, 0x72, 0x6e, + 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x62, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6d, 0x62, 0x6d, 0x2a, 0x45, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, + 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x47, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x47, 0x32, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, + 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x43, 0x10, 0x02, 0x2a, 0x62, 0x0a, 0x19, 0x47, + 0x43, 0x45, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x65, + 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x56, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x41, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x56, 0x5f, 0x45, 0x53, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x54, 0x45, 0x4c, 0x5f, 0x54, 0x44, 0x58, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x41, 0x4d, 0x44, 0x5f, 0x53, 0x45, 0x56, 0x5f, 0x53, 0x4e, 0x50, 0x10, 0x04, 0x2a, + 0x96, 0x01, 0x0a, 0x14, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x53, 0x5f, 0x57, 0x49, 0x4e, 0x44, + 0x4f, 0x57, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x5f, 0x50, 0x43, 0x41, 0x5f, 0x32, 0x30, 0x31, + 0x31, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x53, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, + 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x55, 0x45, 0x46, 0x49, 0x5f, 0x43, 0x41, 0x5f, 0x32, 0x30, + 0x31, 0x31, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x53, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, + 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x4b, 0x45, 0x4b, 0x5f, 0x43, 0x41, 0x5f, 0x32, 0x30, + 0x31, 0x31, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x4b, 0x10, 0x04, 0x2a, 0x4a, 0x0a, 0x08, 0x48, 0x61, 0x73, 0x68, + 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x48, 0x41, 0x31, 0x10, 0x04, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0c, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x48, 0x41, 0x35, + 0x31, 0x32, 0x10, 0x0d, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x67, 0x6f, 0x2d, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x6c, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1340,7 +1419,7 @@ func file_state_proto_rawDescGZIP() []byte { } var file_state_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_state_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_state_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_state_proto_goTypes = []any{ (LogType)(0), // 0: state.LogType (GCEConfidentialTechnology)(0), // 1: state.GCEConfidentialTechnology @@ -1358,6 +1437,7 @@ var file_state_proto_goTypes = []any{ (*EfiApp)(nil), // 13: state.EfiApp (*EfiState)(nil), // 14: state.EfiState (*FirmwareLogState)(nil), // 15: state.FirmwareLogState + (*GMESState)(nil), // 16: state.GMESState } var file_state_proto_depIdxs = []int32{ 1, // 0: state.PlatformState.technology:type_name -> state.GCEConfidentialTechnology @@ -1538,6 +1618,18 @@ func file_state_proto_init() { return nil } } + file_state_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*GMESState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_state_proto_msgTypes[1].OneofWrappers = []any{ (*PlatformState_ScrtmVersionId)(nil), @@ -1553,7 +1645,7 @@ func file_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_state_proto_rawDesc, NumEnums: 4, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, },