Skip to content

Instantly share code, notes, and snippets.

View deeglaze's full-sized avatar

Dionna Amalie Glaze deeglaze

View GitHub Profile
@deeglaze
deeglaze / visualize_signing_material.sh
Created November 22, 2019 22:51
Describes data in SGX sign_tool's gendata output
#!/bin/bash
# A script for explaining different parts of an enclave's signing material
function usage() {
echo >&2
echo "Usage: $(basename "$0") [flags] <path_to_signing_material.dat>" >&2
echo >&2
echo " -c,--color=MODE: MODE is one of always, never, auto [default]." >&2
echo " If in a tty, --color=auto produces color codes." >&2
@deeglaze
deeglaze / client.go.patch
Created February 3, 2023 17:55
go-sev-guest client modification to work around throttling without sev-guest device patches
@@ func UseDefaultSevGuest() bool {
}
func message(d Device, command uintptr, req *labi.SnpUserGuestRequest) error {
- result, err := d.Ioctl(command, req)
- if err != nil {
- // The ioctl could have failed with a firmware error that
- // indicates a problem certificate length. We need to
- // communicate that specifically.
- if req.FwErr != 0 {
@deeglaze
deeglaze / gist:efb75ab98cd834e16ffcc7a8d034f124
Last active June 23, 2025 03:49
Read firmware.igvm (Gemini 2.5 flash)
#include <efi.h>
#include <efiprot.h>
#include <efidef.h>
#include <efilib.h> // For LibLocateProtocol, Print, etc.
// Define the target GUID for the partition
// C12A7328-F81F-11D2-BA4B-00A0C93EC93B
#define TARGET_PARTITION_GUID \
{0xC12A7328, 0xF81F, 0x11D2, {0xBA, 0x4B,0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B}}