)]}'
{"metropolis/pkg/tpm/eventlog/internal/events.go":[{"author":{"_account_id":1000038,"name":"Jan Schär","display_name":"Jan","email":"jan@monogon.tech","username":"jan","avatars":[{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"ea7fca18a783c0485f00b10fa513ebc680092782","unresolved":true,"context_lines":[{"line_number":148,"context_line":"func UntrustedParseEventType(et uint32) (EventType, error) {"},{"line_number":149,"context_line":"\t// \"The value associated with a UEFI specific platform event type MUST be in"},{"line_number":150,"context_line":"\t// the range between 0x80000000 and 0x800000FF, inclusive.\""},{"line_number":151,"context_line":"\tif (et \u003c 0x80000000 \u0026\u0026 et \u003e 0x800000FF) || et \u003e 0x12 {"},{"line_number":152,"context_line":"\t\treturn EventType(0), fmt.Errorf(\"event type not between [0x0, 0x12] or [0x80000000, 0x800000FF]: got %#x\", et)"},{"line_number":153,"context_line":"\t}"},{"line_number":154,"context_line":"\tif _, ok :\u003d eventTypeNames[EventType(et)]; !ok {"}],"source_content_type":"text/x-go","patch_set":1,"id":"38b56d31_76ae38b4","line":151,"updated":"2024-04-22 07:53:19.000000000","message":"```suggestion\n\tif (et \u003c 0x80000000 || et \u003e 0x800000FF) \u0026\u0026 et \u003e 0x12 {\n```","commit_id":"612bb68d45c893a027ebcad0e16c65a497e91f88"},{"author":{"_account_id":1000002,"name":"Serge Bazanski","display_name":"Serge","email":"serge@monogon.tech","username":"serge","avatars":[{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"6e237de1527b0bb978d54c3a942149b1bbae1a5c","unresolved":true,"context_lines":[{"line_number":148,"context_line":"func UntrustedParseEventType(et uint32) (EventType, error) {"},{"line_number":149,"context_line":"\t// \"The value associated with a UEFI specific platform event type MUST be in"},{"line_number":150,"context_line":"\t// the range between 0x80000000 and 0x800000FF, inclusive.\""},{"line_number":151,"context_line":"\tif (et \u003c 0x80000000 \u0026\u0026 et \u003e 0x800000FF) || et \u003e 0x12 {"},{"line_number":152,"context_line":"\t\treturn EventType(0), fmt.Errorf(\"event type not between [0x0, 0x12] or [0x80000000, 0x800000FF]: got %#x\", et)"},{"line_number":153,"context_line":"\t}"},{"line_number":154,"context_line":"\tif _, ok :\u003d eventTypeNames[EventType(et)]; !ok {"}],"source_content_type":"text/x-go","patch_set":1,"id":"ece4950d_18c560e4","line":151,"in_reply_to":"1b76baa5_541fd15a","updated":"2024-04-23 10:30:21.000000000","message":"No, I\u0027m confused within the context of EFI event types. I know parsing this is important for security, so I\u0027d rather have him look at that to triple check what\u0027s going on here.","commit_id":"612bb68d45c893a027ebcad0e16c65a497e91f88"},{"author":{"_account_id":1000002,"name":"Serge Bazanski","display_name":"Serge","email":"serge@monogon.tech","username":"serge","avatars":[{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/52c41428b6369f2c02b9717425216f7d.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"e3bd5a85ad8f2c51f3908ddcb5d95bff0d473ef5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"func UntrustedParseEventType(et uint32) (EventType, error) {"},{"line_number":149,"context_line":"\t// \"The value associated with a UEFI specific platform event type MUST be in"},{"line_number":150,"context_line":"\t// the range between 0x80000000 and 0x800000FF, inclusive.\""},{"line_number":151,"context_line":"\tif (et \u003c 0x80000000 \u0026\u0026 et \u003e 0x800000FF) || et \u003e 0x12 {"},{"line_number":152,"context_line":"\t\treturn EventType(0), fmt.Errorf(\"event type not between [0x0, 0x12] or [0x80000000, 0x800000FF]: got %#x\", et)"},{"line_number":153,"context_line":"\t}"},{"line_number":154,"context_line":"\tif _, ok :\u003d eventTypeNames[EventType(et)]; !ok {"}],"source_content_type":"text/x-go","patch_set":1,"id":"eb5452a5_c1b80810","line":151,"in_reply_to":"38b56d31_76ae38b4","updated":"2024-04-22 09:27:04.000000000","message":"I am confused by all of this, passing this over to Lorenz.","commit_id":"612bb68d45c893a027ebcad0e16c65a497e91f88"},{"author":{"_account_id":1000038,"name":"Jan Schär","display_name":"Jan","email":"jan@monogon.tech","username":"jan","avatars":[{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/fd0e7f48847aa0e46c8f361df2d6c26b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"482e8db0feea2e2c022e4ff8ab2625ac760153d9","unresolved":true,"context_lines":[{"line_number":148,"context_line":"func UntrustedParseEventType(et uint32) (EventType, error) {"},{"line_number":149,"context_line":"\t// \"The value associated with a UEFI specific platform event type MUST be in"},{"line_number":150,"context_line":"\t// the range between 0x80000000 and 0x800000FF, inclusive.\""},{"line_number":151,"context_line":"\tif (et \u003c 0x80000000 \u0026\u0026 et \u003e 0x800000FF) || et \u003e 0x12 {"},{"line_number":152,"context_line":"\t\treturn EventType(0), fmt.Errorf(\"event type not between [0x0, 0x12] or [0x80000000, 0x800000FF]: got %#x\", et)"},{"line_number":153,"context_line":"\t}"},{"line_number":154,"context_line":"\tif _, ok :\u003d eventTypeNames[EventType(et)]; !ok {"}],"source_content_type":"text/x-go","patch_set":1,"id":"1b76baa5_541fd15a","line":151,"in_reply_to":"eb5452a5_c1b80810","updated":"2024-04-23 07:41:56.000000000","message":"We want to return an error if `et` is not in either of the two ranges. `et \u003e 0x12` is true if it\u0027s not in the first range, and `(et \u003c 0x80000000 || et \u003e 0x800000FF)` is true if it\u0027s not in the second range. If both of these are true, then the value is out of range.\n\nAn alternative way of writing this is:\n\n```\n\tif !((et \u003e\u003d 0x80000000 \u0026\u0026 et \u003c\u003d 0x800000FF) || et \u003c\u003d 0x12) {\n```","commit_id":"612bb68d45c893a027ebcad0e16c65a497e91f88"},{"author":{"_account_id":1000001,"name":"Lorenz Brun","display_name":"Lorenz","email":"lorenz@monogon.tech","username":"lorenz","avatars":[{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/75c04f6e9881c24ee621fba80667eed8.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"4be3b48d0c770fc129494edf3905a2665eec29b1","unresolved":false,"context_lines":[{"line_number":148,"context_line":"func UntrustedParseEventType(et uint32) (EventType, error) {"},{"line_number":149,"context_line":"\t// \"The value associated with a UEFI specific platform event type MUST be in"},{"line_number":150,"context_line":"\t// the range between 0x80000000 and 0x800000FF, inclusive.\""},{"line_number":151,"context_line":"\tif (et \u003c 0x80000000 \u0026\u0026 et \u003e 0x800000FF) || et \u003e 0x12 {"},{"line_number":152,"context_line":"\t\treturn EventType(0), fmt.Errorf(\"event type not between [0x0, 0x12] or [0x80000000, 0x800000FF]: got %#x\", et)"},{"line_number":153,"context_line":"\t}"},{"line_number":154,"context_line":"\tif _, ok :\u003d eventTypeNames[EventType(et)]; !ok {"}],"source_content_type":"text/x-go","patch_set":1,"id":"c607f353_96ff3c1d","line":151,"in_reply_to":"ece4950d_18c560e4","updated":"2024-04-30 12:00:06.000000000","message":"I checked with the spec, this is defined as a uint32 and the intent was indeed what it\u0027s being changed to here.","commit_id":"612bb68d45c893a027ebcad0e16c65a497e91f88"}]}
