diff --git a/extract/extract.go b/extract/extract.go index e0c37e0..31d9985 100644 --- a/extract/extract.go +++ b/extract/extract.go @@ -227,6 +227,64 @@ func SecureBootState(replayEvents []tcg.Event, registerCfg registerConfig) (*pb. }, nil } +// EfiDriverState extracts EFI Driver information from a UEFI TCG2 firmware event log. +// Obtained from section 3.3.4.3 PCR[2]-UEFI Drivers and UEFI Applications +// https://trustedcomputinggroup.org/wp-content/uploads/TCG-PC-Client-Platform-Firmware-Profile-Version-1.06-Revision-52_pub-3.pdf +func EfiDriverState(events []tcg.Event, registerCfg registerConfig) (*pb.EfiState, error) { + var ( + seenSeparator bool + efiDriverStates []*pb.EfiApp + efiRuntimeDriverStates []*pb.EfiApp + ) + for _, e := range events { + if e.MRIndex() != registerCfg.FirmwareDriverIdx { + continue + } + + et, err := tcg.UntrustedParseEventType(uint32(e.UntrustedType())) + if err != nil { + return nil, fmt.Errorf("unrecognised event type: %v", err) + } + digestVerify := DigestEquals(e, e.RawData()) + switch et { + case tcg.Separator: + if seenSeparator { + return nil, fmt.Errorf("duplicate separator at event %d", e.Num()) + } + seenSeparator = true + if !bytes.Equal(e.RawData(), []byte{0, 0, 0, 0}) { + return nil, fmt.Errorf("invalid separator data at event %d: %v", e.Num(), e.RawData()) + } + if digestVerify != nil { + return nil, fmt.Errorf("invalid separator digest at event %d: %v", e.Num(), digestVerify) + } + + case tcg.EFIBootServicesDriver: + if !seenSeparator { + // The EFI Boot Services Driver will use the EFI LoadImage service, so try loading it. + _, err := tcg.ParseEFIImageLoad(bytes.NewReader(e.RawData())) + if err != nil { + return nil, fmt.Errorf("failed parsing EFI image load at boot services driver event %d: %v", e.Num(), err) + } + efiDriverStates = append(efiDriverStates, &pb.EfiApp{Digest: e.ReplayedDigest()}) + } + case tcg.EFIRuntimeServicesDriver: + if !seenSeparator { + // The EFI Runtime Services Driver will use the EFI LoadImage service, so try loading it. + _, err := tcg.ParseEFIImageLoad(bytes.NewReader(e.RawData())) + if err != nil { + return nil, fmt.Errorf("failed parsing EFI image load at boot services driver event %d: %v", e.Num(), err) + } + efiRuntimeDriverStates = append(efiRuntimeDriverStates, &pb.EfiApp{Digest: e.ReplayedDigest()}) + } + } + } + return &pb.EfiState{ + BootServicesDrivers: efiDriverStates, + RuntimeServicesDrivers: efiRuntimeDriverStates, + }, nil +} + // PlatformState extracts platform information from a UEFI TCG2 firmware // event log. func PlatformState(hash crypto.Hash, events []tcg.Event) (*pb.PlatformState, error) { @@ -381,7 +439,15 @@ func EfiState(hash crypto.Hash, events []tcg.Event, registerCfg registerConfig) // Otherwise, software further down the bootchain could extend bad // PCR4/RTMR2 measurements. if seenExitBootServices { - return &pb.EfiState{Apps: efiAppStates}, nil + efiDriver, err := EfiDriverState(events, registerCfg) + if err != nil { + return nil, err + } + return &pb.EfiState{ + Apps: efiAppStates, + BootServicesDrivers: efiDriver.BootServicesDrivers, + RuntimeServicesDrivers: efiDriver.RuntimeServicesDrivers, + }, nil } return nil, nil } diff --git a/extract/extract_test.go b/extract/extract_test.go index 9bbb922..365077e 100644 --- a/extract/extract_test.go +++ b/extract/extract_test.go @@ -15,6 +15,7 @@ package extract import ( + "bytes" "crypto" "crypto/rand" "encoding/hex" @@ -24,10 +25,12 @@ import ( "testing" "github.com/google/go-eventlog/internal/testutil" - pb "github.com/google/go-eventlog/proto/state" "github.com/google/go-eventlog/register" "github.com/google/go-eventlog/tcg" "github.com/google/go-eventlog/testdata" + "google.golang.org/protobuf/proto" + + pb "github.com/google/go-eventlog/proto/state" ) func TestExtractFirmwareLogStateRTMR(t *testing.T) { @@ -373,6 +376,129 @@ func TestGrubStateFromRTMRLogWithModifiedNullTerminator(t *testing.T) { } } +func TestEfiState(t *testing.T) { + tests := []struct { + name string + events func() (crypto.Hash, []tcg.Event) + registserConfig registerConfig + wantPass bool + wantEfiState *pb.EfiState + }{ + { + name: "success with TPM logs", + events: func() (crypto.Hash, []tcg.Event) { + return getTPMELEvents(t) + }, + registserConfig: TPMRegisterConfig, + wantPass: true, + wantEfiState: &pb.EfiState{ + Apps: []*pb.EfiApp{ + { + Digest: []byte("rM\xe6\x84M\xd0\xfea\x8b\xa5wl{\xca\x07(\xbe8\xa6TN$\xe4N\xf2Y\xb9\x87\xb7\xab΀"), + }, + { + Digest: []byte("^\x8c\xb7Z\xcd\xf8\xe0\x9e_\xc1L\xc2\xd6\xce\x0c\"\x88\xaf \x89v\xd9s\t\x85\x1cf\x1e\x91\xec\x1e\x03"), + }, + }, + }, + }, + { + name: "success with CCEL logs", + events: func() (crypto.Hash, []tcg.Event) { + return crypto.SHA384, getCCELEvents(t) + }, + registserConfig: RTMRRegisterConfig, + wantPass: true, + wantEfiState: &pb.EfiState{ + Apps: []*pb.EfiApp{ + { + Digest: []byte("Z\x10\x02l\x9a\xd4\x1d\x1f\x90ܜ\xfe\x88\xbc\xab\xe1\x84,\xcf\xd8T\x95\xc8\x1b\x1a\x1a\xb9&\xa9\xef#\xb5\xd2\xe6\x0e\xef\xeb\xa0A[\xbe\\\x8c2\x8a\x89\x9a\n"), + }, + { + Digest: []byte("\xb1\xfb\x7fL\x06\x89\xf5\xa9 \xb8\x00\xb2`pu\xf4\x90o\x8c\x82\x82\xd4NV\xfc\x99\x1e\xc0\x1f\x1a\xda\xc1v\xd2\x04\n&\xf1E=\xf1\x12\xd7\xc4\xf4)?\xc9"), + }, + }, + }, + }, + { + name: "nil EFI state with missing ExitBootServicesInvocation event in TPM logs", + events: func() (crypto.Hash, []tcg.Event) { + hash, evts := getTPMELEvents(t) + var failedEvts []tcg.Event + for _, e := range evts { + if bytes.Equal(e.RawData(), []byte(tcg.ExitBootServicesInvocation)) { + continue + } + failedEvts = append(failedEvts, e) + } + return hash, failedEvts + }, + registserConfig: TPMRegisterConfig, + wantPass: true, + wantEfiState: nil, + }, + { + name: "failed with missing CallingEFIApp event in TPM logs", + events: func() (crypto.Hash, []tcg.Event) { + hash, evts := getTPMELEvents(t) + var failedEvts []tcg.Event + for _, e := range evts { + if bytes.Equal(e.RawData(), []byte(tcg.CallingEFIApplication)) { + continue + } + failedEvts = append(failedEvts, e) + } + return hash, failedEvts + }, + registserConfig: TPMRegisterConfig, + wantPass: false, + wantEfiState: nil, + }, + { + name: "failed with multiple separators in TPM logs", + events: func() (crypto.Hash, []tcg.Event) { + hash, evts := getTPMELEvents(t) + for i := range evts { + evts[i].Type = tcg.Separator + } + return hash, evts + }, + registserConfig: TPMRegisterConfig, + wantPass: false, + wantEfiState: nil, + }, + { + name: "failed with bad data in TPM logs", + events: func() (crypto.Hash, []tcg.Event) { + hash, evts := getTPMELEvents(t) + for i := range evts { + b := make([]byte, len(evts[i].Data)) + if _, err := rand.Read(b); err != nil { + t.Fatal(err) + } + evts[i].Data = b + } + return hash, evts + }, + registserConfig: TPMRegisterConfig, + wantPass: false, + wantEfiState: nil, + }, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + hash, events := tc.events() + efiState, err := EfiState(hash, events, tc.registserConfig) + if gotPass := (err == nil); gotPass != tc.wantPass { + t.Errorf("EfiState returned unexpected result, gotPass %v, but want %v", gotPass, tc.wantPass) + } + if !proto.Equal(efiState, tc.wantEfiState) { + t.Errorf("EfiState returned unexpected state, got %+v, but want %+v", efiState, tc.wantEfiState) + } + }) + } +} + func getTPMELEvents(t *testing.T) (crypto.Hash, []tcg.Event) { log := testdata.Ubuntu2404AmdSevSnpEventLog bank := testutil.MakePCRBank(pb.HashAlgo_SHA256, map[uint32][]byte{ diff --git a/proto/state.proto b/proto/state.proto index 686779f..1e86af7 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -161,10 +161,11 @@ message SecureBootState { message EfiApp { // The PE/COFF digest of the EFI application (pulled from the raw event digest). + // This can also represent digest of the EFI boot/runtime service drivers. bytes digest = 1; } -// The verified state of EFI Applications. Policy usage on this machine state +// The verified state of EFI Drivers and Applications. Policy usage on this machine state // should check the entire set of EFI App digests matches, not a subset. message EfiState { // UEFI's OS Loader code is required to measure attempts to load and execute @@ -172,6 +173,12 @@ message EfiState { // UEFI applications are typically bootloaders such as shim and GRUB. // These run and are measured using the UEFI LoadImage() service. repeated EfiApp apps = 1; + // The EFI drivers, + // obtained from https://trustedcomputinggroup.org/wp-content/uploads/TCG_EFI_Platform_1_22_Final_-v15.pdf#page=22. + // The EFI Boot Services Drivers from adapter or loaded bydriver in adapter. + repeated EfiApp boot_services_drivers = 2; + // The EFI Runtime Drivers from adapter or loaded bydriver in adapter. + repeated EfiApp runtime_services_drivers = 3; } // Enum values come from the TCG Algorithm Registry - v1.27 - Table 3. diff --git a/proto/state/state.pb.go b/proto/state/state.pb.go index e169aa2..0d6d44f 100644 --- a/proto/state/state.pb.go +++ b/proto/state/state.pb.go @@ -948,6 +948,7 @@ type EfiApp struct { unknownFields protoimpl.UnknownFields // The PE/COFF digest of the EFI application (pulled from the raw event digest). + // This can also represent digest of the EFI boot/runtime service drivers. Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` } @@ -990,7 +991,7 @@ func (x *EfiApp) GetDigest() []byte { return nil } -// The verified state of EFI Applications. Policy usage on this machine state +// The verified state of EFI Drivers and Applications. Policy usage on this machine state // should check the entire set of EFI App digests matches, not a subset. type EfiState struct { state protoimpl.MessageState @@ -1002,6 +1003,12 @@ type EfiState struct { // UEFI applications are typically bootloaders such as shim and GRUB. // These run and are measured using the UEFI LoadImage() service. Apps []*EfiApp `protobuf:"bytes,1,rep,name=apps,proto3" json:"apps,omitempty"` + // The EFI drivers, + // obtained from https://trustedcomputinggroup.org/wp-content/uploads/TCG_EFI_Platform_1_22_Final_-v15.pdf#page=22. + // The EFI Boot Services Drivers from adapter or loaded bydriver in adapter. + BootServicesDrivers []*EfiApp `protobuf:"bytes,2,rep,name=boot_services_drivers,json=bootServicesDrivers,proto3" json:"boot_services_drivers,omitempty"` + // The EFI Runtime Drivers from adapter or loaded bydriver in adapter. + RuntimeServicesDrivers []*EfiApp `protobuf:"bytes,3,rep,name=runtime_services_drivers,json=runtimeServicesDrivers,proto3" json:"runtime_services_drivers,omitempty"` } func (x *EfiState) Reset() { @@ -1043,6 +1050,20 @@ func (x *EfiState) GetApps() []*EfiApp { return nil } +func (x *EfiState) GetBootServicesDrivers() []*EfiApp { + if x != nil { + return x.BootServicesDrivers + } + return nil +} + +func (x *EfiState) GetRuntimeServicesDrivers() []*EfiApp { + if x != nil { + return x.RuntimeServicesDrivers + } + return nil +} + // The verified state of a booted machine, obtained from a UEFI event log. // The state is extracted from either EFI_TCG2_PROTOCOL or // EFI_CC_MEASUREMENT_PROTOCOL. Both of these follow the TCG-defined format @@ -1238,63 +1259,72 @@ var file_state_proto_rawDesc = []byte{ 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x6b, 0x22, 0x20, 0x0a, 0x06, 0x45, 0x66, 0x69, 0x41, 0x70, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x08, 0x45, 0x66, 0x69, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x66, 0x69, 0x41, - 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x22, 0x85, 0x03, 0x0a, 0x10, 0x46, 0x69, 0x72, - 0x6d, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, - 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x37, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x72, 0x61, 0x77, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x41, 0x6c, 0x67, 0x6f, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x67, 0x72, - 0x75, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x47, 0x72, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x04, 0x67, 0x72, 0x75, 0x62, - 0x12, 0x3a, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, - 0x69, 0x6e, 0x75, 0x78, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x0b, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x03, - 0x65, 0x66, 0x69, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x45, 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, + 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x08, 0x45, 0x66, + 0x69, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x61, 0x70, 0x70, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x66, 0x69, + 0x41, 0x70, 0x70, 0x52, 0x04, 0x61, 0x70, 0x70, 0x73, 0x12, 0x41, 0x0a, 0x15, 0x62, 0x6f, 0x6f, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2e, 0x45, 0x66, 0x69, 0x41, 0x70, 0x70, 0x52, 0x13, 0x62, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x18, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x66, 0x69, 0x41, 0x70, 0x70, 0x52, 0x16, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x44, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x22, 0x85, 0x03, 0x0a, 0x10, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, + 0x72, 0x65, 0x4c, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x37, 0x0a, 0x0b, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x72, 0x61, 0x77, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x41, 0x6c, 0x67, + 0x6f, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x04, 0x67, 0x72, 0x75, 0x62, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x47, 0x72, + 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x04, 0x67, 0x72, 0x75, 0x62, 0x12, 0x3a, 0x0a, + 0x0c, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x69, 0x6e, 0x75, + 0x78, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x6c, 0x69, + 0x6e, 0x75, 0x78, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x03, 0x65, 0x66, 0x69, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, + 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, } var ( @@ -1341,19 +1371,21 @@ var file_state_proto_depIdxs = []int32{ 11, // 8: state.SecureBootState.pk:type_name -> state.Database 11, // 9: state.SecureBootState.kek:type_name -> state.Database 13, // 10: state.EfiState.apps:type_name -> state.EfiApp - 5, // 11: state.FirmwareLogState.platform:type_name -> state.PlatformState - 12, // 12: state.FirmwareLogState.secure_boot:type_name -> state.SecureBootState - 9, // 13: state.FirmwareLogState.raw_events:type_name -> state.Event - 3, // 14: state.FirmwareLogState.hash:type_name -> state.HashAlgo - 7, // 15: state.FirmwareLogState.grub:type_name -> state.GrubState - 8, // 16: state.FirmwareLogState.linux_kernel:type_name -> state.LinuxKernelState - 14, // 17: state.FirmwareLogState.efi:type_name -> state.EfiState - 0, // 18: state.FirmwareLogState.log_type:type_name -> state.LogType - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 13, // 11: state.EfiState.boot_services_drivers:type_name -> state.EfiApp + 13, // 12: state.EfiState.runtime_services_drivers:type_name -> state.EfiApp + 5, // 13: state.FirmwareLogState.platform:type_name -> state.PlatformState + 12, // 14: state.FirmwareLogState.secure_boot:type_name -> state.SecureBootState + 9, // 15: state.FirmwareLogState.raw_events:type_name -> state.Event + 3, // 16: state.FirmwareLogState.hash:type_name -> state.HashAlgo + 7, // 17: state.FirmwareLogState.grub:type_name -> state.GrubState + 8, // 18: state.FirmwareLogState.linux_kernel:type_name -> state.LinuxKernelState + 14, // 19: state.FirmwareLogState.efi:type_name -> state.EfiState + 0, // 20: state.FirmwareLogState.log_type:type_name -> state.LogType + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_state_proto_init() }