Commit Graph
72 Commits
Author SHA1 Message Date
Stefan Berger 5354f12a17 [Pal] Move host-generic dl-machine-x86_64.h to Pal/include/arch/x86_64
Also, adapt the Makefiles and INPUT paths in Doxyfile-pal to include the
new directory.
2020-05-09 14:43:17 +02:00
Dmitrii Kuvaiskii 165e932144 [Pal/Linux-SGX] Add support for DCAP SGX driver versions 1.6+
The DCAP SGX driver v1.6+ closely follows the in-kernel SGX driver
v28+. This version changes the driver path to /dev/sgx/enclave and
changes argument struct of the SGX_IOC_ENCLAVE_ADD_PAGE ioctl.
2020-05-08 12:49:26 -07:00
borysp 6cb111b6d1 [LibOS] Completely rework LibOS VMA bookkeeping
This commit completely reworks VMA subsystem along with its usages.
New version should be: cleaner (easier to maintain), faster and allow
for bookkeeping requests from Pal.
It also fixes some bugs and inconsistencies found in the process and
changes brk and mmap/munmap implementations (at least partially).
2020-05-02 16:22:00 +02:00
Anjo Vahldiek-Oberwagner f33c368ef6 [Docs] Add prerequisite libcurl4-openssl-dev to Build and Quick Start docs 2020-05-01 16:49:19 +00:00
Michał Kowalczyk 12bedb08a7 [LibOS] Rename SHIM_SYSCALL_PASSTHROUGH to SHIM_SYSCALL_RETURN_ENOSYS 2020-05-01 13:31:09 +02:00
Michał Kowalczyk 964fd17910 [Docs] Misc rewordings 2020-04-15 23:35:12 +02:00
Michał Kowalczyk 1dad67b481 [Docs] Fix links formatting 2020-04-15 23:35:12 +02:00
Michał Kowalczyk e060006bd7 [Docs] Drop the last mention of security monitor 2020-04-15 23:35:12 +02:00
Michał Kowalczyk f07ff167fc [Docs] Clean up mentions of integration examples 2020-04-15 23:32:00 +02:00
Michał Kowalczyk 87f133f435 [Docs] Use auto-numbered lists in reST files 2020-04-15 23:32:00 +02:00
Michał Kowalczyk 4f6153b4cd [Docs] Mention that DCAP requires root 2020-04-15 23:32:00 +02:00
Dmitrii Kuvaiskii 77c86fbae3 [Pal] Introduce DkAttestationReport() API for local report retrieval
New DkAttestationReport() API retrieves the attestation report (local)
from the local attestation mechanism. Currently, it is implemented
only for Linux-SGX PAL and stubbed for all other PALs. The Linux-SGX
implementation retrieves the SGX report via EREPORT instruction.
The caller of this new API may learn sizes of report_data, target_info,
and report structs. The caller may also obtain current target info.
Finally, the caller may obtain the report for use in local attestation.
A simple test case is added to PAL tests.
2020-04-13 20:09:50 -07:00
Chihyun SongandDmitrii Kuvaiskii b4d3cbccc6 [Pal/Linux-SGX] Add support for the DCAP SGX driver versions 1.5-
The DCAP SGX driver works with Flexible Launch Control (FLC) enabled
SGX processors. The FLC feature allows to use arbitrary non-Intel
Launch Enclaves and thus makes the EINITTOKEN struct unnecessary.
This commit skips the step of obtaining the EINITTOKEN struct from
the Launch enclave and instead allows to create a dummy token for
DCAP- and FLC-enabled SGX systems.

Co-authored-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
2020-04-07 11:12:17 -07:00
Michał Kowalczyk 742983f6bf [Pal] Remove unused _DkGetPagesize
LibOS needs to know only allocation alignment and PAL has g_page_size.
2020-04-02 01:46:48 +02:00
Michał Kowalczyk 727c2ab049 Fix typos 2020-04-02 01:46:48 +02:00
Michał Kowalczyk 5cc0ae0c9e Clean up newly migrated apps and LTP 2020-03-30 21:10:41 +02:00
Rafał Wojdyła 6bec83c033 [Docs] Add man pages for SGX utilities 2020-03-27 11:45:32 +01:00
Dmitrii Kuvaiskii 80030b1157 [Pal] Introduce DkAttestationQuote() API for quote retrieval
New DkAttestationQuote() API retrieves the attestation quote from the
underlying host-OS attestation mechanism. Currently, it is implemented
only for Linux-SGX PAL and stubbed for all other PALs. The Linux-SGX
implementation retrieves the SGX quote via sgx_get_quote() which
communicates with the Quoting Enclave via AESM service. The caller of
this new API may forward the obtained quote to the remote user for
remote attestation.
2020-03-24 22:03:35 -07:00
Dmitrii Kuvaiskii 58c53ad747 [Pal/Linux-SGX] Add exitless system calls
This commit adds the ability to invoke system calls in "exitless" fashion
(aka asynchronously). New manifest option `sgx.rpc_thread_num = X`
instructs Graphene to create X outside-enclave RPC threads that spin-wait
for syscalls (and any OCALLs in general) on a shared queue. In-enclave
threads do not exit the enclave but instead enqueue the syscall in the queue
and wait for it to be processed by an RPC thread. Not to waste CPU resources,
enclave threads first spin (in the hope syscall will return immediately) and
then sleep on a futex.

Omitting `sgx.rpc_thread_num` or setting it to zero defaults to the old way
of executing syscalls: exiting the enclave, executing the syscall, and
re-entering it again.

The exitless feature works with multi-process apps and correctly handles
signals. Two tests of exitless syscalls were added to regression tests.
2020-03-24 00:34:45 -07:00
Wojtek Porczyk a9114dcef0 [Docs] Add SGX introduction
Initial version with basic SGX information and links.
2020-03-23 03:19:17 +01:00
Wojtek Porczyk 7404d657a1 [Docs, Pal] Add missing references
Those features are yet to be documented, for now only create references
to silence Sphinx warnings.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 59e974f5b5 [Docs, Jenkins] Silence useless -n warnings
Sphinx complains about undocumented basic types like uint32_t.
Those are not supposed to be documented.

Feel free to add more in the future.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 9488e32a9c [Docs] Have monospace font in signatures 2020-03-22 00:20:21 +01:00
Wojtek Porczyk 9c09ffd7a7 [Docs] Fix a link in howto-doc.rst 2020-03-22 00:20:21 +01:00
Wojtek Porczyk f1cbeeed3a [Docs] reSTify CODESTYLE.md 2020-03-22 00:20:21 +01:00
Wojtek Porczyk e898613c63 [Docs] reSTify oldwiki/Introduction-to-Graphene-SGX.md, orphan
This document will be rewritten to SGX intro as part of another PR.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 6ae7f5194c [Docs] reSTify HACKING.md
This does not really belong to /, it is part of documentation. Now it is
called "Development Setup". In the future I'd like this to also include
relevant apt-get and whatever else.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 8ea5d6e083 [Docs] reSTify CONTRIBUTING.md
The file was rewritten in reST, but left where it belongs so it is still
linked by GitHub. Now it is also included in RTD.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 68314acc86 [Docs] Rewrite index and README, reSTify oldwiki/Introduction-to-Graphene.md
This is a big rewrite of several introduction-level documents. There
were several copies of mostly the same information, but desynchronized
in time. Most of that was split between those files:
- README, now shortened and appropriate for GitHub landing
- index.rst (include README removed)
- building.rst

quickstart.rst was corrected according to building.rst
2020-03-22 00:20:21 +01:00
Wojtek Porczyk a6f7ef423d [Docs] reSTify oldwiki/Implementing-New-System-Calls-in-Graphene.md 2020-03-22 00:20:21 +01:00
Wojtek Porczyk a0fe1eb567 [Docs] reSTify oldwiki/Process-Creation-in-Graphene-SGX.md 2020-03-22 00:20:21 +01:00
Wojtek Porczyk feb87ac8a6 [Docs] reSTify oldwiki/Porting-Graphene-PAL-to-Other-hosts.md 2020-03-22 00:20:21 +01:00
Wojtek Porczyk e7f9952bcc [Docs] reSTify oldwiki/Run-Applications-in-Graphene[-SGX].md
Those went into a single file: sample-apps.rst.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk dc634a7c51 [Docs] reSTify oldwiki/Graphene-SGX-Quick-Start.md
Included into quickstart.rst.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 4e32c1f237 [Docs] reSTify oldwiki/Supported-System-Calls-in-Graphene.md
Additionally, add a disclaimer that the file is outdated.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 613e9f7ea7 [Docs] reSTify oldwiki/Signal-Handling-in-Graphene.md 2020-03-22 00:20:21 +01:00
Wojtek Porczyk 3fc67d6de2 [Docs] reSTify oldwiki/PAL-Host-ABI.md
Most of this document was moved to pal.h as Doxygen comments.
2020-03-22 00:20:21 +01:00
Wojtek Porczyk 5bd70316fc [Docs] reSTify oldwiki/Graphene[-SGX]-Manifest-Syntax
The two documents were joined, because they describe the same file.
Additionally, fix units descriptions in manifest-syntax.rst (MiB vs MB).
2020-03-21 23:46:05 +01:00
Wojtek Porczyk 52c17cff14 [Docs] Change the logo to be all white 2020-03-21 23:46:05 +01:00
Wojtek Porczyk 473a77c362 [Docs] Add logo
The logo is stolen from https://grapheneproject.io/.
2020-03-21 23:46:05 +01:00
Wojtek Porczyk 4a464724b4 [Docs] Set C as the default language 2020-03-21 23:46:05 +01:00
Wojtek Porczyk a079a97f5e [Docs] Add \rst to Doxygen syntax
Allows writing verbatim reST in C comments to be rendered in
documentation.

Stolen from https://breathe.readthedocs.io/en/latest/markups.html.
2020-03-21 23:46:05 +01:00
Wojtek Porczyk 527bb358f4 [Docs] Split Doxygen into multiple subprojects
This is done, because multiple PAL implementations necessarily have
common function names.
2020-03-21 23:46:05 +01:00
Wojtek Porczyk b52aad6c03 [Docs] Change |nbsp| to |~|
|nbsp| is so long it breaks reading pace. |~| is shorter and also more
familiar to TeX writers. |nbsp| is still used in GitHub-specific
documents, because GitHub doesn't parse our conf.py.
2020-03-21 23:46:05 +01:00
Dmitrii Kuvaiskii 8d76f9d3fb [Pal/Linux-SGX] Remove remote attestation functionality
Previously, Graphene with SGX performed self-remote attestation
by retrieving the SGX quote from the Quoting Enclave, sending it
to the Intel Attestation Service via Curl (in an HTTPS request),
and parsing the received from IAS remote-attestation certificate.

This self-attestation functionality is meaningless and is removed.
Moreover, since EPID-based remote attestation requires client key
(Ocp-Apim-Subscription-Key), and this key must be kept secret,
specifying it in the Graphene manifest (as was done previously) is
insecure. Therefore, the whole remote attestation functionality is
moved out of Graphene and to another trusted party (or to the app
on top of Graphene). Only the SGX quote retrieval from the Quoting
Enclave is kept in Graphene.
2020-03-19 18:08:37 +00:00
Dmitrii Kuvaiskii ff8457f54e [Pal/Linux-SGX] Remove support for Intel SGX drivers version 1.8- 2020-02-13 17:37:23 -08:00
Dmitrii Kuvaiskii 2c6ff2718f [Pal] Purge all multicast/broadcast functionality
Multicast and broadcast functionality was added to Linux and Linux-SGX
PALs in hope that LibOS would use it for distributed consensus. This
never happened, and multicast/broadcast is not used currently.
2020-01-27 13:48:21 -08:00
Wojtek Porczyk f27eaa16d2 [Docs] Fix debugging.rst 2020-01-21 16:19:31 +01:00
Wojtek Porczyk c063acf9c6 [Docs] Fix PAL description in glossary 2020-01-21 16:19:31 +01:00
Wojtek Porczyk 76af85e6b7 [Docs] reSTify oldwiki/Graphene-Quick-Start.md 2020-01-21 16:19:31 +01:00