Skip to content

BUGs in WAMR #2252

Open
Open
@LeoneChen

Description

@LeoneChen

Hello~

GS register shouldn't be modified in linux-sgx platform hardware mode (64 bit)

In linux-sgx

get_thread_data use READ_TD_DATA assembly macro here, for Enclave Thread Data/Thread Local Storage usage.
image

And in SGX hardware mode, READ_TD_DATA use GS register in 64bit mode as base address of thread data. here
(Note in hardware mode SE_SIM is undefined)
image

In wamr

Thus it shouldn't modify GS register in Enclave.here for example
image

os_writegsbase macro is at here

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions