From ffbe62254e99249ec952e4f1d6d0f6e81ac654db Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 7 Nov 2019 12:09:30 -0800 Subject: [PATCH] [LibOS/Glibc] Remove struct shim_tcb embedded in Glibc TCB Previously, struct shim_tcb was embedded in Glibc's TCB but recent commits to Graphene move shim_tcb to PAL's TCB. Thus, this commit removes inserting shim_tcb from Glibc patches. --- LibOS/glibc-patches/glibc-2.19.patch | 14 +------------- LibOS/glibc-patches/glibc-2.23.patch | 14 +------------- LibOS/glibc-patches/glibc-2.27.patch | 14 +------------- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/LibOS/glibc-patches/glibc-2.19.patch b/LibOS/glibc-patches/glibc-2.19.patch index f54fa3d8..656f5537 100644 --- a/LibOS/glibc-patches/glibc-2.19.patch +++ b/LibOS/glibc-patches/glibc-2.19.patch @@ -653,26 +653,14 @@ diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index cbb5e9e..9b87e25 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h -@@ -28,6 +28,8 @@ +@@ -28,6 +28,7 @@ # include # include # include -+# include +# include /* Replacement type for __m128 since this file is included by ld.so, which is compiled with -mno-sse. It must not change the alignment -@@ -67,6 +69,10 @@ typedef struct - # else - int __glibc_reserved1; - # endif -+ -+ shim_tcb_t shim_tcb; /* For graphene, we allocate a shim_tcb -+ in the real tcb. */ -+ - int rtld_must_xmm_save; - /* Reservation of some values for the TM ABI. */ - void *__private_tm[4]; @@ -154,7 +159,7 @@ typedef struct _head->self = _thrdescr; \ \ diff --git a/LibOS/glibc-patches/glibc-2.23.patch b/LibOS/glibc-patches/glibc-2.23.patch index a08c1477..21215212 100644 --- a/LibOS/glibc-patches/glibc-2.23.patch +++ b/LibOS/glibc-patches/glibc-2.23.patch @@ -602,26 +602,14 @@ diff -ruNp a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h diff -ruNp a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h --- a/sysdeps/x86_64/nptl/tls.h +++ b/sysdeps/x86_64/nptl/tls.h -@@ -28,6 +28,8 @@ +@@ -28,6 +28,7 @@ # include # include # include -+# include +# include /* Replacement type for __m128 since this file is included by ld.so, which is compiled with -mno-sse. It must not change the alignment -@@ -67,6 +69,10 @@ typedef struct - # else - int __glibc_reserved1; - # endif -+ -+ shim_tcb_t shim_tcb; /* For graphene, we allocate a shim_tcb -+ in the real tcb. */ -+ - int __glibc_unused1; - /* Reservation of some values for the TM ABI. */ - void *__private_tm[4]; @@ -138,7 +144,6 @@ typedef struct # define GET_DTV(descr) \ (((tcbhead_t *) (descr))->dtv) diff --git a/LibOS/glibc-patches/glibc-2.27.patch b/LibOS/glibc-patches/glibc-2.27.patch index 487349d8..1e05ca79 100644 --- a/LibOS/glibc-patches/glibc-2.27.patch +++ b/LibOS/glibc-patches/glibc-2.27.patch @@ -458,26 +458,14 @@ diff -ruNp a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h diff -ruNp a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h --- a/sysdeps/x86_64/nptl/tls.h +++ b/sysdeps/x86_64/nptl/tls.h -@@ -29,6 +29,8 @@ +@@ -29,6 +29,7 @@ # include /* For cast_to_integer. */ # include # include -+# include +# include /* Replacement type for __m128 since this file is included by ld.so, which is compiled with -mno-sse. It must not change the alignment -@@ -56,6 +58,10 @@ typedef struct - # else - int __glibc_reserved1; - # endif -+ -+ shim_tcb_t shim_tcb; /* For graphene, we allocate a shim_tcb -+ in the real tcb. */ -+ - int __glibc_unused1; - /* Reservation of some values for the TM ABI. */ - void *__private_tm[4]; @@ -144,7 +149,7 @@ typedef struct _head->self = _thrdescr; \ \