From: Cedric Xing <cedric.xing@intel.com> To: linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org Cc: cedric.xing@intel.com, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, kai.svahn@intel.com, kai.huang@intel.com, jarkko.sakkinen@linux.intel.com Subject: [RFC PATCH v2 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface Date: Tue, 23 Apr 2019 23:26:23 -0700 [thread overview] Message-ID: <20190424062623.4345-4-cedric.xing@intel.com> (raw) In-Reply-To: <20190424062623.4345-1-cedric.xing@intel.com> In-Reply-To: <cover.1555965327.git.cedric.xing@intel.com> This patch augments SGX selftest with two new tests. The first test exercises the newly added callback interface, by marking the whole enclave range as PROT_READ, then calling mprotect() upon #PFs to add necessary PTE permissions per PFEC (#PF Error Code) until the enclave finishes. This test also serves as an example to demonstrate the callback interface. The second test single-steps through __vdso_sgx_enter_enclave() to make sure the call stack can be unwound at every instruction within that vDSO API. Its purpose is to validate the hand-crafted CFI directives in the assembly. Signed-off-by: Cedric Xing <cedric.xing@intel.com> --- tools/testing/selftests/x86/sgx/Makefile | 6 +- tools/testing/selftests/x86/sgx/main.c | 323 ++++++++++++++++++--- tools/testing/selftests/x86/sgx/sgx_call.S | 40 ++- 3 files changed, 322 insertions(+), 47 deletions(-) diff --git a/tools/testing/selftests/x86/sgx/Makefile b/tools/testing/selftests/x86/sgx/Makefile index 3af15d7c8644..31f937e220c4 100644 --- a/tools/testing/selftests/x86/sgx/Makefile +++ b/tools/testing/selftests/x86/sgx/Makefile @@ -14,16 +14,16 @@ TEST_CUSTOM_PROGS := $(OUTPUT)/test_sgx all_64: $(TEST_CUSTOM_PROGS) $(TEST_CUSTOM_PROGS): main.c sgx_call.S $(OUTPUT)/encl_piggy.o - $(CC) $(HOST_CFLAGS) -o $@ $^ + $(CC) $(HOST_CFLAGS) -o $@ $^ -lunwind -ldl -Wl,--defsym,__image_base=0 -pie $(OUTPUT)/encl_piggy.o: encl_piggy.S $(OUTPUT)/encl.bin $(OUTPUT)/encl.ss $(CC) $(HOST_CFLAGS) -I$(OUTPUT) -c $< -o $@ $(OUTPUT)/encl.bin: $(OUTPUT)/encl.elf - objcopy --remove-section=.got.plt -O binary $< $@ + objcopy -O binary $< $@ $(OUTPUT)/encl.elf: encl.lds encl.c encl_bootstrap.S - $(CC) $(ENCL_CFLAGS) -T $^ -o $@ + $(CC) $(ENCL_CFLAGS) -T $^ -o $@ -Wl,--build-id=none $(OUTPUT)/encl.ss: $(OUTPUT)/sgxsign signing_key.pem $(OUTPUT)/encl.bin $^ $@ diff --git a/tools/testing/selftests/x86/sgx/main.c b/tools/testing/selftests/x86/sgx/main.c index e2265f841fb0..d3e53c71306d 100644 --- a/tools/testing/selftests/x86/sgx/main.c +++ b/tools/testing/selftests/x86/sgx/main.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) // Copyright(c) 2016-18 Intel Corporation. +#define _GNU_SOURCE #include <elf.h> #include <fcntl.h> #include <stdbool.h> @@ -9,16 +10,31 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/stat.h> -#include <sys/time.h> +#include <sys/auxv.h> +#include <signal.h> +#include <sys/ucontext.h> + +#define UNW_LOCAL_ONLY +#include <libunwind.h> + #include "encl_piggy.h" #include "defines.h" #include "../../../../../arch/x86/kernel/cpu/sgx/arch.h" #include "../../../../../arch/x86/include/uapi/asm/sgx.h" -static const uint64_t MAGIC = 0x1122334455667788ULL; +#define _Q(x) __Q(x) +#define __Q(x) #x +#define ERRLN "Line " _Q(__LINE__) + +#define X86_EFLAGS_TF (1ul << 8) + +extern char __image_base[]; +size_t eenter; +static size_t vdso_base; struct vdso_symtab { Elf64_Sym *elf_symtab; @@ -26,20 +42,11 @@ struct vdso_symtab { Elf64_Word *elf_hashtab; }; -static void *vdso_get_base_addr(char *envp[]) +static void vdso_init(void) { - Elf64_auxv_t *auxv; - int i; - - for (i = 0; envp[i]; i++); - auxv = (Elf64_auxv_t *)&envp[i + 1]; - - for (i = 0; auxv[i].a_type != AT_NULL; i++) { - if (auxv[i].a_type == AT_SYSINFO_EHDR) - return (void *)auxv[i].a_un.a_val; - } - - return NULL; + vdso_base = getauxval(AT_SYSINFO_EHDR); + if (!vdso_base) + exit(1); } static Elf64_Dyn *vdso_get_dyntab(void *addr) @@ -66,8 +73,9 @@ static void *vdso_get_dyn(void *addr, Elf64_Dyn *dyntab, Elf64_Sxword tag) return NULL; } -static bool vdso_get_symtab(void *addr, struct vdso_symtab *symtab) +static bool vdso_get_symtab(struct vdso_symtab *symtab) { + void *addr = (void *)vdso_base; Elf64_Dyn *dyntab = vdso_get_dyntab(addr); symtab->elf_symtab = vdso_get_dyn(addr, dyntab, DT_SYMTAB); @@ -138,7 +146,7 @@ static bool encl_create(int dev_fd, unsigned long bin_size, base = mmap(NULL, secs->size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED, dev_fd, 0); if (base == MAP_FAILED) { - perror("mmap"); + perror(ERRLN); return false; } @@ -224,35 +232,271 @@ static bool encl_load(struct sgx_secs *secs, unsigned long bin_size) return false; } -void sgx_call(void *rdi, void *rsi, void *tcs, - struct sgx_enclave_exception *exception, - void *eenter); +int sgx_call(void *rdi, void *rsi, long rdx, void *rcx, void *r8, void *r9, + void *tcs, struct sgx_enclave_exinfo *ei, void *cb); + +static void show_enclave_exinfo(const struct sgx_enclave_exinfo *exinfop, + const char *header) +{ + static const char * const enclu_leaves[] = { + "EREPORT", + "EGETKEY", + "EENTER", + "ERESUME", + "EEXIT" + }; + static const char * const exception_names[] = { + "#DE", + "#DB", + "NMI", + "#BP", + "#OF", + "#BR", + "#UD", + "#NM", + "#DF", + "CSO", + "#TS", + "#NP", + "#SS", + "#GP", + "#PF", + "Unknown", + "#MF", + "#AC", + "#MC", + "#XM", + "#VE", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown" + }; + + printf("%s: leaf:%s(%d)", header, + enclu_leaves[exinfop->leaf], exinfop->leaf); + if (exinfop->leaf != 4) + printf(" trap:%s(%d) ec:%d addr:0x%llx\n", + exception_names[exinfop->trapnr], exinfop->trapnr, + exinfop->error_code, exinfop->address); + else + printf("\n"); +} + +static const uint64_t MAGIC = 0x1122334455667788ULL; -int main(int argc, char *argv[], char *envp[]) +static void test1(struct sgx_secs *secs) +{ + uint64_t result = 0; + struct sgx_enclave_exinfo exinfo; + + printf("[1] Entering the enclave without callback.\n"); + + printf("Input: 0x%lx\n Expect: Same as input\n", MAGIC); + sgx_call((void *)&MAGIC, &result, 0, NULL, NULL, NULL, + (void *)secs->base, &exinfo, NULL); + show_enclave_exinfo(&exinfo, " Exit"); + if (result != MAGIC) { + fprintf(stderr, "0x%lx != 0x%lx\n", result, MAGIC); + exit(1); + } + printf(" Output: 0x%lx\n", result); + + printf("Input: Null TCS\n Expect: #PF at EENTER\n"); + sgx_call((void *)&MAGIC, &result, 0, NULL, NULL, NULL, + NULL, &exinfo, NULL); + show_enclave_exinfo(&exinfo, " Exit"); + if (exinfo.leaf != 2 /*EENTER*/ || exinfo.trapnr != 14 /*#PF*/) + exit(1); +} + +static int test2_callback(long rdi, long rsi, long rdx, + struct sgx_enclave_exinfo *ei, long r8, long r9, + void *tcs, long ursp) +{ + show_enclave_exinfo(ei, " callback"); + + switch (ei->leaf) { + case 4: + return 0; + case 3: + case 2: + switch (ei->trapnr) { + case 1: /*#DB*/ + break; + case 14:/*#PF*/ + if ((ei->error_code & 1) == 0) { + fprintf(stderr, ERRLN + ": Unexpected #PF error code\n"); + exit(1); + } + if (mprotect((void *)(ei->address & -0x1000), 0x1000, + ((ei->error_code & 2) ? PROT_WRITE : 0) | + ((ei->error_code & 0x10) ? PROT_EXEC : 0) | + PROT_READ)) { + perror(ERRLN); + exit(1); + } + break; + default: + fprintf(stderr, ERRLN ": Unexpected exception\n"); + exit(1); + } + return ei->leaf == 2 ? -EAGAIN : ei->leaf; + } + return -EINVAL; +} + +static void test2(struct sgx_secs *secs) +{ + uint64_t result = 0; + struct sgx_enclave_exinfo exinfo; + + printf("[2] Entering the enclave with callback.\n"); + + printf("Input: 0x%lx\n Expect: Same as input\n", MAGIC); + sgx_call((void *)&MAGIC, &result, 0, NULL, NULL, NULL, + (void *)secs->base, &exinfo, test2_callback); + if (result != MAGIC) { + fprintf(stderr, "0x%lx != 0x%lx\n", result, MAGIC); + exit(1); + } + printf(" Output: 0x%lx\n", result); + + printf("Input: Read-only enclave (0x%lx-0x%lx)\n" + " Expect: #PFs to be fixed by callback\n", + secs->base, secs->base + (encl_bin_end - encl_bin) - 1); + if (mprotect((void *)secs->base, encl_bin_end - encl_bin, PROT_READ)) { + perror(ERRLN); + exit(1); + } + while (sgx_call((void *)&MAGIC, &result, 0, NULL, NULL, NULL, + (void *)secs->base, &exinfo, test2_callback) == -EAGAIN) + ; + show_enclave_exinfo(&exinfo, " Exit"); + if (exinfo.leaf != 4 /*EEXIT*/) + exit(1); +} + +static struct test3_proc_context { + unw_word_t ip, bx, sp, bp, r12, r13, r14, r15; +} test3_ctx; + +static unw_word_t test3_getcontext(unw_cursor_t *cursor, + struct test3_proc_context *ctxp) +{ + unw_get_reg(cursor, UNW_REG_IP, &ctxp->ip); + unw_get_reg(cursor, UNW_REG_SP, &ctxp->sp); + unw_get_reg(cursor, UNW_X86_64_RBX, &ctxp->bx); + unw_get_reg(cursor, UNW_X86_64_RBP, &ctxp->bp); + unw_get_reg(cursor, UNW_X86_64_R12, &ctxp->r12); + unw_get_reg(cursor, UNW_X86_64_R13, &ctxp->r13); + unw_get_reg(cursor, UNW_X86_64_R14, &ctxp->r14); + unw_get_reg(cursor, UNW_X86_64_R15, &ctxp->r15); + return ctxp->ip; +} + +static void test3_sigtrap(int sig, siginfo_t *info, ucontext_t *ctxp) +{ + static int in_vdso_eenter; + static size_t caller; + + unw_cursor_t cursor; + unw_context_t uc; + struct test3_proc_context pc; + + if (ctxp->uc_mcontext.gregs[REG_RIP] == eenter) { + in_vdso_eenter = 1; + caller = *(size_t *)(ctxp->uc_mcontext.gregs[REG_RSP]); + printf(" trace started at ip:%llx (vdso:0x%llx)\n", + ctxp->uc_mcontext.gregs[REG_RIP], + ctxp->uc_mcontext.gregs[REG_RIP] - vdso_base); + } + + if (!in_vdso_eenter) + return; + + if (ctxp->uc_mcontext.gregs[REG_RIP] == caller) { + in_vdso_eenter = 0; + ctxp->uc_mcontext.gregs[REG_EFL] &= ~X86_EFLAGS_TF; + printf(" trace ended successfully at ip:%llx (executable:0x%llx)\n", + ctxp->uc_mcontext.gregs[REG_RIP], + ctxp->uc_mcontext.gregs[REG_RIP] - + (size_t)__image_base); + return; + } + + unw_getcontext(&uc); + unw_init_local(&cursor, &uc); + while (unw_step(&cursor) > 0 && + test3_getcontext(&cursor, &pc) != test3_ctx.ip) + ; + + if (memcmp(&pc, &test3_ctx, sizeof(pc))) { + fprintf(stderr, ERRLN ": Error unwinding\n"); + exit(1); + } +} + +static void test3_set_tf(void) +{ + __asm__ ("pushfq; orl %0, (%%rsp); popfq" : : "i"(X86_EFLAGS_TF)); +} + +static void test3(struct sgx_secs *secs) +{ + unw_cursor_t cursor; + unw_context_t uc; + struct sigaction sa = { + .sa_sigaction = (void (*)(int, siginfo_t*, void*))test3_sigtrap, + .sa_flags = SA_SIGINFO, + }; + + unw_getcontext(&uc); + unw_init_local(&cursor, &uc); + if (unw_step(&cursor) > 0) + test3_getcontext(&cursor, &test3_ctx); + else { + fprintf(stderr, ERRLN ": error initializing unwind context\n"); + exit(1); + } + + if (sigaction(SIGTRAP, &sa, NULL) < 0) { + perror(ERRLN); + exit(1); + } + + test3_set_tf(); + test1(secs); + + test3_set_tf(); + test2(secs); +} + +int main(void) { unsigned long bin_size = encl_bin_end - encl_bin; unsigned long ss_size = encl_ss_end - encl_ss; - struct sgx_enclave_exception exception; Elf64_Sym *eenter_sym; struct vdso_symtab symtab; struct sgx_secs secs; - uint64_t result = 0; - void *eenter; - void *addr; - - memset(&exception, 0, sizeof(exception)); - addr = vdso_get_base_addr(envp); - if (!addr) - exit(1); + vdso_init(); - if (!vdso_get_symtab(addr, &symtab)) + if (!vdso_get_symtab(&symtab)) exit(1); eenter_sym = vdso_symtab_get(&symtab, "__vdso_sgx_enter_enclave"); if (!eenter_sym) exit(1); - eenter = addr + eenter_sym->st_value; + eenter = vdso_base + eenter_sym->st_value; printf("Binary size %lu (0x%lx), SIGSTRUCT size %lu\n", bin_size, bin_size, ss_size); @@ -266,14 +510,11 @@ int main(int argc, char *argv[], char *envp[]) if (!encl_load(&secs, bin_size)) exit(1); - printf("Input: 0x%lx\n", MAGIC); - sgx_call((void *)&MAGIC, &result, (void *)secs.base, &exception, - eenter); - if (result != MAGIC) { - fprintf(stderr, "0x%lx != 0x%lx\n", result, MAGIC); - exit(1); - } + printf("--- Functional Tests ---\n"); + test1(&secs); + test2(&secs); - printf("Output: 0x%lx\n", result); - exit(0); + printf("--- Unwind Tests ---\n"); + test3(&secs); + return 0; } diff --git a/tools/testing/selftests/x86/sgx/sgx_call.S b/tools/testing/selftests/x86/sgx/sgx_call.S index 14bd0a044199..ca2c0c947758 100644 --- a/tools/testing/selftests/x86/sgx/sgx_call.S +++ b/tools/testing/selftests/x86/sgx/sgx_call.S @@ -7,9 +7,43 @@ .global sgx_call sgx_call: + .cfi_startproc + push %r15 + .cfi_adjust_cfa_offset 8 + .cfi_rel_offset %r15, 0 + push %r14 + .cfi_adjust_cfa_offset 8 + .cfi_rel_offset %r14, 0 + push %r13 + .cfi_adjust_cfa_offset 8 + .cfi_rel_offset %r13, 0 + push %r12 + .cfi_adjust_cfa_offset 8 + .cfi_rel_offset %r12, 0 push %rbx - mov $0x02, %rax - mov %rdx, %rbx - call *%r8 + .cfi_adjust_cfa_offset 8 + .cfi_rel_offset %rbx, 0 + push $0 + .cfi_adjust_cfa_offset 8 + push 0x48(%rsp) + .cfi_adjust_cfa_offset 8 + push 0x48(%rsp) + .cfi_adjust_cfa_offset 8 + push 0x48(%rsp) + .cfi_adjust_cfa_offset 8 + mov $2, %eax + call *eenter(%rip) + add $0x20, %rsp + .cfi_adjust_cfa_offset -0x20 pop %rbx + .cfi_adjust_cfa_offset -8 + pop %r12 + .cfi_adjust_cfa_offset -8 + pop %r13 + .cfi_adjust_cfa_offset -8 + pop %r14 + .cfi_adjust_cfa_offset -8 + pop %r15 + .cfi_adjust_cfa_offset -8 ret + .cfi_endproc -- 2.17.1
next prev parent reply other threads:[~2019-04-24 6:26 UTC|newest] Thread overview: 318+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-17 10:39 [PATCH v20 00/28] Intel SGX1 support Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 01/28] x86/cpufeatures: Add Intel-defined SGX feature bit Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 02/28] x86/cpufeatures: Add SGX sub-features (as Linux-defined bits) Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 03/28] x86/msr: Add IA32_FEATURE_CONTROL.SGX_ENABLE definition Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 04/28] x86/cpufeatures: Add Intel-defined SGX_LC feature bit Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 05/28] x86/msr: Add SGX Launch Control MSR definitions Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 06/28] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 07/28] x86/mm: x86/sgx: Signal SIGSEGV for userspace #PFs w/ PF_SGX Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 08/28] x86/cpu/intel: Detect SGX support and update caps appropriately Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 09/28] x86/sgx: Add ENCLS architectural error codes Jarkko Sakkinen 2019-04-22 21:35 ` Sean Christopherson 2019-04-17 10:39 ` [PATCH v20 10/28] x86/sgx: Add SGX1 and SGX2 architectural data structures Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 11/28] x86/sgx: Add wrappers for ENCLS leaf functions Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 12/28] x86/sgx: Enumerate and track EPC sections Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 13/28] x86/sgx: Add functions to allocate and free EPC pages Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 14/28] x86/sgx: Add sgx_einit() for initializing enclaves Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 15/28] x86/sgx: Add the Linux SGX Enclave Driver Jarkko Sakkinen 2019-04-22 21:58 ` Sean Christopherson 2019-04-23 23:29 ` Jethro Beekman 2019-04-24 0:26 ` Sean Christopherson 2019-04-24 1:04 ` Jethro Beekman 2019-04-29 19:08 ` Sean Christopherson 2019-06-04 20:12 ` Sean Christopherson 2019-06-05 14:29 ` Jarkko Sakkinen 2019-06-05 14:52 ` Sean Christopherson 2019-06-05 21:25 ` Dr. Greg 2019-06-05 22:20 ` Sean Christopherson 2019-06-06 15:32 ` Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 16/28] x86/sgx: Add provisioning Jarkko Sakkinen 2019-04-19 3:06 ` Huang, Kai 2019-04-23 14:33 ` Jarkko Sakkinen 2019-04-24 1:34 ` Jethro Beekman 2019-05-02 8:27 ` Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 17/28] x86/sgx: Add swapping code to the core and SGX driver Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 18/28] x86/sgx: ptrace() support for the " Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 19/28] x86/vdso: Add support for exception fixup in vDSO functions Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 20/28] x86/fault: Add helper function to sanitize error code Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 21/28] x86/fault: Attempt to fixup unhandled #PF in vDSO before signaling Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 22/28] x86/traps: Attempt to fixup exceptions " Jarkko Sakkinen 2019-06-25 15:43 ` Jarkko Sakkinen 2019-06-27 20:32 ` Xing, Cedric 2019-07-11 15:54 ` Sean Christopherson 2019-07-11 22:12 ` Xing, Cedric 2019-07-11 15:56 ` Sean Christopherson 2019-07-11 17:52 ` Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 23/28] x86/vdso: Add __vdso_sgx_enter_enclave() to wrap SGX enclave transitions Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 24/28] selftests/x86: Add a selftest for SGX Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 25/28] x86/sgx: Update MAINTAINERS Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 26/28] docs: x86/sgx: Add Architecture documentation Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 27/28] docs: x86/sgx: Document kernel internals Jarkko Sakkinen 2019-04-17 10:39 ` [PATCH v20 28/28] docs: x86/sgx: Document the enclave API Jarkko Sakkinen 2019-04-18 17:10 ` [PATCH v20 00/28] Intel SGX1 support Dr. Greg 2019-04-18 17:24 ` Dave Hansen 2019-04-19 16:24 ` Dr. Greg 2019-04-19 16:39 ` Dave Hansen 2019-04-18 18:01 ` Dave Hansen 2019-04-19 14:17 ` Dr. Greg 2019-04-19 14:25 ` Dave Hansen 2019-04-19 15:27 ` Andy Lutomirski 2019-04-19 19:38 ` Jethro Beekman 2019-04-19 20:39 ` Thomas Gleixner 2019-04-19 20:46 ` Jethro Beekman 2019-04-19 20:50 ` Thomas Gleixner 2019-04-19 20:54 ` Jethro Beekman 2019-04-19 21:15 ` Andy Lutomirski 2019-04-19 21:19 ` Jethro Beekman 2019-04-19 21:31 ` Andy Lutomirski 2019-04-19 21:35 ` Jethro Beekman 2019-04-19 21:38 ` Thomas Gleixner 2019-04-19 21:56 ` Jethro Beekman 2019-04-20 5:42 ` Thomas Gleixner 2019-04-20 16:02 ` Dr. Greg 2019-04-22 15:01 ` Sean Christopherson 2019-04-22 16:24 ` Dr. Greg 2019-04-22 16:48 ` Sean Christopherson 2019-04-22 16:55 ` Linus Torvalds 2019-04-22 17:17 ` Sean Christopherson 2019-04-23 9:11 ` Dr. Greg 2019-04-22 16:26 ` Andy Lutomirski 2019-04-23 21:15 ` Jethro Beekman 2019-05-10 17:23 ` Xing, Cedric 2019-05-10 17:37 ` Jethro Beekman 2019-05-10 17:54 ` Dave Hansen 2019-05-10 18:04 ` Jethro Beekman 2019-05-10 18:56 ` Xing, Cedric 2019-05-10 19:04 ` Jethro Beekman 2019-05-10 19:22 ` Andy Lutomirski 2019-05-11 1:06 ` Xing, Cedric 2019-05-14 15:08 ` Andy Lutomirski 2019-05-15 8:31 ` Jarkko Sakkinen [not found] ` <20190513102926.GD8743@linux.intel.com> 2019-05-14 10:43 ` Jarkko Sakkinen 2019-05-14 15:13 ` Andy Lutomirski 2019-05-14 20:45 ` Sean Christopherson 2019-05-14 21:27 ` Andy Lutomirski 2019-05-14 22:28 ` Xing, Cedric 2019-05-15 1:30 ` Sean Christopherson 2019-05-15 18:27 ` SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support) Andy Lutomirski 2019-05-15 19:58 ` James Morris 2019-05-15 20:35 ` Andy Lutomirski 2019-05-15 22:46 ` James Morris 2019-05-15 23:13 ` Andy Lutomirski 2019-05-16 3:03 ` Xing, Cedric 2019-05-16 4:40 ` Andy Lutomirski 2019-05-16 22:23 ` Xing, Cedric 2019-05-17 0:35 ` Andy Lutomirski 2019-05-17 1:06 ` Xing, Cedric 2019-05-17 1:21 ` Andy Lutomirski 2019-05-17 16:05 ` Sean Christopherson 2019-05-17 13:53 ` Stephen Smalley 2019-05-17 15:09 ` Sean Christopherson 2019-05-17 16:20 ` Stephen Smalley 2019-05-17 16:24 ` Andy Lutomirski 2019-05-17 16:37 ` Stephen Smalley 2019-05-17 17:12 ` Andy Lutomirski 2019-05-17 18:05 ` Stephen Smalley 2019-05-17 19:20 ` Stephen Smalley 2019-05-17 19:28 ` Sean Christopherson 2019-05-17 20:09 ` Stephen Smalley 2019-05-17 20:14 ` Andy Lutomirski 2019-05-17 20:34 ` Stephen Smalley 2019-05-17 21:36 ` Sean Christopherson 2019-05-17 17:29 ` Sean Christopherson 2019-05-17 17:42 ` Stephen Smalley 2019-05-17 17:50 ` Sean Christopherson 2019-05-17 18:16 ` Stephen Smalley 2019-05-17 17:43 ` Andy Lutomirski 2019-05-17 17:55 ` Sean Christopherson 2019-05-17 18:04 ` Linus Torvalds 2019-05-17 18:21 ` Sean Christopherson 2019-05-17 18:33 ` Linus Torvalds 2019-05-17 18:52 ` Sean Christopherson 2019-05-17 18:53 ` Andy Lutomirski 2019-05-16 7:24 ` James Morris 2019-05-16 21:00 ` Andy Lutomirski 2019-05-20 9:38 ` Dr. Greg 2019-05-15 21:38 ` Sean Christopherson 2019-05-16 1:19 ` Haitao Huang 2019-05-16 5:16 ` Jarkko Sakkinen 2019-05-16 21:02 ` Andy Lutomirski 2019-05-16 22:45 ` Sean Christopherson 2019-05-16 23:29 ` Xing, Cedric 2019-05-20 11:29 ` Jarkko Sakkinen 2019-05-20 11:33 ` Jarkko Sakkinen 2019-05-17 0:03 ` Sean Christopherson 2019-05-17 0:26 ` Andy Lutomirski 2019-05-17 15:41 ` Sean Christopherson 2019-05-20 11:42 ` Jarkko Sakkinen 2019-05-20 11:41 ` Jarkko Sakkinen 2019-05-21 15:19 ` Jarkko Sakkinen 2019-05-21 15:24 ` Jethro Beekman 2019-05-22 13:10 ` Jarkko Sakkinen 2019-05-21 15:51 ` Sean Christopherson 2019-05-22 13:20 ` Jarkko Sakkinen 2019-05-22 13:22 ` Jarkko Sakkinen 2019-05-22 13:56 ` Stephen Smalley 2019-05-22 15:38 ` Sean Christopherson 2019-05-22 22:42 ` Andy Lutomirski 2019-05-23 2:35 ` Sean Christopherson 2019-05-23 10:26 ` Jarkko Sakkinen 2019-05-23 14:17 ` Sean Christopherson 2019-05-23 15:38 ` Andy Lutomirski 2019-05-23 23:40 ` Sean Christopherson 2019-05-24 1:17 ` Andy Lutomirski 2019-05-24 7:24 ` Xing, Cedric 2019-05-24 15:41 ` Stephen Smalley 2019-05-24 16:57 ` Xing, Cedric 2019-05-24 17:42 ` Sean Christopherson 2019-05-24 17:54 ` Andy Lutomirski 2019-05-24 17:56 ` Sean Christopherson 2019-05-24 17:54 ` Sean Christopherson 2019-05-24 18:34 ` Xing, Cedric 2019-05-24 19:13 ` Sean Christopherson 2019-05-24 19:30 ` Andy Lutomirski 2019-05-24 20:42 ` Xing, Cedric 2019-05-24 21:11 ` Sean Christopherson 2019-05-24 19:37 ` Andy Lutomirski 2019-05-24 20:03 ` Sean Christopherson 2019-05-24 20:58 ` Xing, Cedric 2019-05-24 21:27 ` Andy Lutomirski 2019-05-24 22:41 ` Sean Christopherson 2019-05-24 23:42 ` Andy Lutomirski 2019-05-25 22:40 ` Xing, Cedric 2019-05-26 0:57 ` Andy Lutomirski 2019-05-26 6:09 ` Xing, Cedric 2019-05-28 20:24 ` Sean Christopherson 2019-05-28 20:48 ` Andy Lutomirski 2019-05-28 21:41 ` Sean Christopherson 2019-05-30 5:38 ` Xing, Cedric 2019-05-30 17:21 ` Sean Christopherson 2019-05-29 14:08 ` Stephen Smalley 2019-05-30 6:12 ` Xing, Cedric 2019-05-30 14:22 ` Stephen Smalley 2019-05-30 14:31 ` Andy Lutomirski 2019-05-30 15:04 ` Stephen Smalley 2019-05-30 16:14 ` Andy Lutomirski 2019-05-30 18:01 ` Sean Christopherson 2019-05-30 19:20 ` Andy Lutomirski 2019-05-30 21:16 ` Sean Christopherson 2019-05-30 21:23 ` Andy Lutomirski 2019-05-30 21:36 ` Sean Christopherson 2019-06-03 9:12 ` Dr. Greg 2019-06-03 21:08 ` Jarkko Sakkinen 2019-05-30 21:48 ` Xing, Cedric 2019-05-30 22:24 ` Sean Christopherson 2019-06-03 21:05 ` Jarkko Sakkinen 2019-06-03 20:54 ` Jarkko Sakkinen 2019-06-03 21:23 ` Sean Christopherson 2019-06-04 11:39 ` Jarkko Sakkinen 2019-06-03 21:37 ` Andy Lutomirski 2019-06-03 20:47 ` Jarkko Sakkinen 2019-06-03 20:43 ` Jarkko Sakkinen 2019-05-25 17:31 ` Dr. Greg 2019-05-24 16:43 ` Andy Lutomirski 2019-05-24 17:07 ` Sean Christopherson 2019-05-24 17:51 ` Andy Lutomirski 2019-05-24 14:44 ` Stephen Smalley 2019-05-27 13:48 ` Jarkko Sakkinen 2019-05-23 19:58 ` Sean Christopherson 2019-05-27 13:34 ` Jarkko Sakkinen 2019-05-27 13:38 ` Jarkko Sakkinen 2019-05-23 8:10 ` Jarkko Sakkinen 2019-05-23 8:23 ` Jarkko Sakkinen 2019-05-20 11:36 ` Jarkko Sakkinen 2019-05-15 10:35 ` [PATCH v20 00/28] Intel SGX1 support Jarkko Sakkinen 2019-05-15 11:00 ` Jarkko Sakkinen 2019-05-15 14:27 ` Andy Lutomirski 2019-05-16 5:07 ` Jarkko Sakkinen 2019-05-16 6:51 ` Jarkko Sakkinen 2019-05-16 7:02 ` Jarkko Sakkinen 2019-05-15 13:21 ` Sean Christopherson 2019-05-16 5:01 ` Jarkko Sakkinen 2019-05-15 8:49 ` Jarkko Sakkinen 2019-05-15 9:58 ` Jarkko Sakkinen 2019-05-14 14:33 ` Haitao Huang 2019-05-14 15:17 ` Andy Lutomirski 2019-05-14 15:30 ` Haitao Huang 2019-05-14 20:45 ` Andy Lutomirski 2019-05-14 21:08 ` Haitao Huang 2019-05-14 21:58 ` Xing, Cedric 2019-05-15 5:15 ` Haitao Huang 2019-05-10 18:44 ` Xing, Cedric 2019-04-19 21:34 ` Thomas Gleixner 2019-04-19 21:05 ` Jethro Beekman 2019-04-18 18:07 ` Andy Lutomirski 2019-04-22 20:42 ` [RFC PATCH v1 0/3] An alternative __vdso_sgx_enter_enclave() to allow enclave/host parameter passing using untrusted stack Cedric Xing 2019-04-22 22:05 ` Sean Christopherson 2019-04-23 0:37 ` Cedric Xing 2019-04-24 6:26 ` [RFC PATCH v2 " Cedric Xing 2019-07-10 11:17 ` Jarkko Sakkinen 2019-07-10 18:08 ` Xing, Cedric 2019-07-10 22:46 ` Jarkko Sakkinen 2019-07-10 22:54 ` Xing, Cedric 2019-07-11 9:36 ` Jarkko Sakkinen 2019-07-11 19:49 ` Xing, Cedric 2019-07-10 23:15 ` Jarkko Sakkinen 2019-07-10 23:37 ` Xing, Cedric 2019-07-11 9:38 ` Jarkko Sakkinen 2019-07-11 15:50 ` Sean Christopherson 2019-07-11 17:59 ` Jarkko Sakkinen 2019-07-11 19:51 ` Xing, Cedric 2019-07-11 4:21 ` [RFC PATCH v3 0/3] x86/sgx: Amend vDSO API to allow enclave/host parameter passing on " Cedric Xing 2019-07-12 3:28 ` Jarkko Sakkinen 2019-07-13 6:51 ` [RFC PATCH v4 " Cedric Xing 2019-07-13 6:51 ` [RFC PATCH v4 1/3] selftests/x86/sgx: Fix Makefile for SGX selftest Cedric Xing 2019-07-13 15:10 ` Jarkko Sakkinen 2019-07-13 15:15 ` Jarkko Sakkinen 2019-07-13 17:29 ` Xing, Cedric 2019-07-14 14:53 ` Jarkko Sakkinen 2019-07-13 6:51 ` [RFC PATCH v4 2/3] x86/vdso: Modify __vdso_sgx_enter_enclave() to allow parameter passing on untrusted stack Cedric Xing 2019-07-13 15:04 ` Jarkko Sakkinen 2019-07-13 15:06 ` Jarkko Sakkinen 2019-07-13 6:51 ` [RFC PATCH v4 3/3] selftests/x86/sgx: Augment SGX selftest to test vDSO API Cedric Xing 2019-07-13 15:21 ` Jarkko Sakkinen 2019-07-13 17:20 ` Xing, Cedric 2019-07-14 14:40 ` Jarkko Sakkinen 2019-07-14 14:47 ` Jarkko Sakkinen 2019-07-17 21:57 ` Xing, Cedric 2019-07-11 4:21 ` [RFC PATCH v3 1/3] selftests/x86: Fixed Makefile for SGX selftest Cedric Xing 2019-07-11 4:21 ` [RFC PATCH v3 2/3] x86/vdso: Modify __vdso_sgx_enter_enclave() to allow parameter passing on untrusted stack Cedric Xing 2019-07-11 9:50 ` Jarkko Sakkinen 2019-07-11 9:53 ` Jarkko Sakkinen 2019-07-11 15:42 ` Sean Christopherson 2019-07-11 17:55 ` Jarkko Sakkinen 2019-07-11 17:58 ` Sean Christopherson 2019-07-12 3:16 ` Jarkko Sakkinen 2019-07-13 7:00 ` Xing, Cedric 2019-07-11 4:21 ` [RFC PATCH v3 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface Cedric Xing 2019-04-24 6:26 ` [RFC PATCH v2 1/3] selftests/x86: Fixed Makefile for SGX selftest Cedric Xing 2019-07-12 3:19 ` Jarkko Sakkinen 2019-07-13 6:58 ` Xing, Cedric 2019-04-24 6:26 ` [RFC PATCH v2 2/3] x86/vdso: Modify __vdso_sgx_enter_enclave() to allow parameter passing on untrusted stack Cedric Xing 2019-04-24 19:04 ` Sean Christopherson 2019-04-25 23:31 ` Xing, Cedric 2019-04-26 21:00 ` Sean Christopherson 2019-05-02 8:28 ` Jarkko Sakkinen 2019-04-24 6:26 ` Cedric Xing [this message] 2019-07-12 3:25 ` [RFC PATCH v2 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface Jarkko Sakkinen 2019-07-13 7:03 ` Xing, Cedric 2019-04-22 20:42 ` [RFC PATCH v1 1/3] selftests/x86: Fixed Makefile for SGX selftest Cedric Xing 2019-04-23 0:37 ` Cedric Xing 2019-04-22 20:42 ` [RFC PATCH v1 2/3] x86/vdso: Modify __vdso_sgx_enter_enclave() to allow parameter passing on untrusted stack Cedric Xing 2019-04-22 22:26 ` Sean Christopherson 2019-04-23 0:37 ` Cedric Xing 2019-04-23 1:25 ` Andy Lutomirski 2019-04-24 17:56 ` Xing, Cedric 2019-04-23 19:26 ` Sean Christopherson 2019-04-23 19:44 ` Andy Lutomirski 2019-04-22 20:42 ` [RFC PATCH v1 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface Cedric Xing 2019-04-23 0:37 ` Cedric Xing 2019-04-23 1:29 ` Andy Lutomirski 2019-04-23 1:48 ` Sean Christopherson 2019-04-23 18:59 ` Sean Christopherson 2019-04-23 19:07 ` Andy Lutomirski 2019-04-23 20:11 ` Sean Christopherson 2019-04-23 11:56 ` [PATCH v20 00/28] Intel SGX1 support Jarkko Sakkinen 2019-04-23 16:52 ` Andy Lutomirski 2019-04-24 12:17 ` Jarkko Sakkinen 2019-05-08 13:45 ` Jarkko Sakkinen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190424062623.4345-4-cedric.xing@intel.com \ --to=cedric.xing@intel.com \ --cc=akpm@linux-foundation.org \ --cc=dave.hansen@intel.com \ --cc=haitao.huang@intel.com \ --cc=jarkko.sakkinen@linux.intel.com \ --cc=kai.huang@intel.com \ --cc=kai.svahn@intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sgx@vger.kernel.org \ --cc=sean.j.christopherson@intel.com \ --cc=serge.ayoun@intel.com \ --cc=shay.katz-zamir@intel.com \ --subject='Re: [RFC PATCH v2 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).