Documentation ¶
Index ¶
Constants ¶
View Source
const ( SGX_ENCLU_EENTER = 0x02 SGX_ENCLU_ERESUME = 0x03 SGX_ENCLU_EXIT = 0x04 )
Not really used, just here for documentation.
View Source
const ( PAGE_READ = 0x1 PAGE_WRITE = 0x2 PAGE_EXEC = 0x4 PAGE_TCS = 0x8 PAGE_NOEXTEND = 0x10 )
View Source
const ( SGX_SECINFO_R = 0x01 SGX_SECINFO_W = 0x02 SGX_SECINFO_X = 0x04 )
View Source
const ( SGX_SECINFO_SECS = 0x000 SGX_SECINFO_TCS = 0x100 SGX_SECINFO_REG = 0x200 )
View Source
const ( SGX_FS_LIMIT = 0xffffffff SGX_GS_LIMIT = 0xffffffff )
View Source
const ( STACK_SIZE = 0x8000 TCS_SIZE = PSIZE SSA_SIZE = PSIZE MSGX_SIZE = PSIZE TLS_SIZE = PSIZE MEMBUF_SIZE = runtime.MEMBUF_SIZE //(PSIZE * 300) )
Sizes for the different elements
View Source
const ( STACK_TCS_OFF = PSIZE TCS_SSA_OFF = 0 SSA_MSGX_OFF = PSIZE MSGX_TLS_OFF = 0 TLS_MHSTART_OFF = PSIZE )
Offsets are of the form FROM_TO_OFF = VALUE
View Source
const ( SGX_PATH = "/dev/isgx" PSIZE = uintptr(0x1000) //TODO @aghosn this must be exactly the same as in amd64/obj.go ENCLMASK = 0x040000000000 ENCLSIZE = 0x001000000000 MMMASK = 0x050000000000 SIM_OFF = 0x08 SIM_FLAG = 0x050000000008 MSGX_ADDR = 0x050000000020 //TLS is m0+m_tls+8 TLS_MSGX_OFF = (0x98 + 8) // TODO this depends on m_tls which is bad. NBTCS = runtime.EnclaveMaxTls // how many tcs do we provide. )
View Source
const ( SGX_HASH_SIZE = 32 SGX_MAC_SIZE = 16 METADATA_MAGIC = uint64(0x86A80294635D0E4C) METADATA_VERSION = uint64(0x200000003) SE_KEY_SIZE = 384 /* in bytes */ SE_EXPONENT_SIZE = 4 /* RSA public key exponent size in bytes */ TPE_DBG = (1 << 31) )
View Source
const ( SGX_MAGIC = 0xA4 ERR_SGX_INVALID_EINIT_TOKEN = 16 ERR_SGX_INVALID_CPUSVN = 32 ERR_SGX_INVALID_ISVSVN = 64 //TODO(aghosn) for the moment I hardcode it, but should be more resilient. SGX_IOC_ENCLAVE_CREATE = ((1 << 30) | (SGX_MAGIC << 8) | (0) | (8 << 16)) SGX_IOC_ENCLAVE_ADD_PAGE = ((1 << 30) | (SGX_MAGIC << 8) | (0x01) | (26 << 16)) SGX_IOC_ENCLAVE_INIT = ((1 << 30) | (SGX_MAGIC << 8) | (0x02) | (24 << 16)) SGX_ATTR_MODE64BIT = 0x04 TCS_DBGOPTION = 1 )
View Source
const (
TCS_N_SSA = 2
)
Variables ¶
View Source
var (
RT_M0 = uintptr(0)
)
Functions ¶
func EpollPWait ¶
func EpollPWait(req *runtime.OExitRequest)
func FutexSleep ¶
func FutexSleep(req *runtime.OExitRequest)
func FutexWakeup ¶
func FutexWakeup(req *runtime.OExitRequest)
func Gosecload ¶
Gosecload has the same signature as newproc(). It creates the enclave if it does not exist yet, and write to the cooperative channel.
func LoadEnclave ¶
func LoadEnclave()
Types ¶
type AESM_message ¶
type AESM_message struct {
// contains filtered or unexported fields
}
type LaunchTokenRequest ¶
type LaunchTokenRequest struct { MrEnclave []byte `protobuf:"bytes,1,req,name=mr_enclave,json=mrEnclave" json:"mr_enclave,omitempty"` MrSigner []byte `protobuf:"bytes,2,req,name=mr_signer,json=mrSigner" json:"mr_signer,omitempty"` SeAttributes []byte `protobuf:"bytes,3,req,name=se_attributes,json=seAttributes" json:"se_attributes,omitempty"` Timeout *uint32 `protobuf:"varint,9,opt,name=timeout" json:"timeout,omitempty"` XXX_unrecognized []byte `json:"-"` }
type SortedElfSections ¶
func (SortedElfSections) Len ¶
func (s SortedElfSections) Len() int
func (SortedElfSections) Less ¶
func (s SortedElfSections) Less(i, j int) bool
func (SortedElfSections) Swap ¶
func (s SortedElfSections) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.