Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

[Pal/lib] Add spinlocks to mbedTLS-specific SSL recv/send #2059

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 5, 2021

  1. [Pal/lib] Remove "api.h" include from "spinlock.h"

    The common header "spinlock.h" contains spinlock implementation. It
    may be used in LibOS, PAL, and other parts of Graphene. Previously,
    it included "api.h" which is PAL-specific. This prevented using
    "spinlock.h" in PAL-agnostic parts of Graphene such as mbedTLS
    crypto adapters. This commit removes this dependency and fixes
    a few emerged include-related bugs.
    dimakuv committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    2ed2110 View commit details
    Browse the repository at this point in the history
  2. [Pal/lib] Add spinlocks to mbedTLS-specific SSL recv/send

    Linux-SGX PAL wraps all pipe/UNIX domain socket communication in
    TLS sessions. Previously, Graphene assumed that only one thread
    at a time accesses one TLS session (i.e., no multi-threading
    support). This commit adds spinlocks to `lib_SSL*` functions to
    support such (rare) multi-threading scenarios. Note that we cannot
    rely on pthreads and/or mutexes so we use simple spinlocks.
    
    This commit adds a corresponding LibOS test.
    dimakuv committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    4d016c0 View commit details
    Browse the repository at this point in the history