Files
borysp c24bddd5aa [LibOS] Rework signal handling and syscall emulation
Change log (most important only):
- unify CPU context structures - now we have only one version -
  `PAL_CONTEXT` - which is shared between LibOS and PALs and it should
  depend only on the host architecture (not OS),
- syscalls emulation changed:
  - dedicated LibOS stack is now used for syscalls emulation,
  - removed one indirection level in syscalls table - now it stores
    `shim_do_*` functions directly,
- signal handling - completely rewritten:
  - all signal queues use proper locking schemes now,
  - signals are handled *only* when returning to the user app from LibOS
    or PAL,
  - nested signals are now possible,
  - the app is allowed to jump out of signal handler with the same
    sematics as on normal Linux,
  - signal altstack is now fully supported,
  - syscall restarting is now supported,
  - doing a backtrace from the signal handler works properly,
- disallow injecting host-level signals, with one exception, see
  `sys.enable_sigterm_injection` manifest option for more details.
2021-02-05 14:11:21 +01:00
..
2021-01-20 17:27:29 +01:00
2020-09-25 05:11:54 -07:00

# Memcached

This directory contains the Makefile and the template manifest for the most
recent version of Memcached as of this writing (v1.5.21). This was tested on a
machine with SGX v1 and Ubuntu 18.04.

The Makefile and the template manifest contain extensive comments and are made
self-explanatory. Please review them to gain understanding in Graphene-SGX
and requirements for applications running under Graphene-SGX.

# Prerequisites

Please install `libevent-dev` package. If you want to benchmark with memcslap,
also install `libmemcached-tools`.

# Quick Start

```sh
# build Memcached and the final manifest
make SGX=1

# run original Memcached against a benchmark (memtier_benchmark,
# install the benchmark on your host OS first)
./memcached &
memtier_benchmark --port=11211 --protocol=memcache_binary --hide-histogram
killall memcached

# run Memcached in non-SGX Graphene against a benchmark
# (note -u nobody, for explanation see memcached.manifest.template)
./pal_loader memcached -u nobody &
memtier_benchmark --port=11211 --protocol=memcache_binary --hide-histogram
killall pal-Linux

# run Memcached in Graphene-SGX against a benchmark
SGX=1 ./pal_loader memcached -u nobody &
memtier_benchmark --port=11211 --protocol=memcache_binary --hide-histogram
killall pal-Linux-SGX
```