about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/x86
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-03-18 04:35:54 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-03-18 04:35:54 -0700
commit1fabdb99084df004f7f4cdc7068d1be209a258be (patch)
tree3d0bdb677e7bc8d6d1080d37604a1cf4b3253d21 /sysdeps/unix/sysv/linux/x86
parent49348beafe9ba150c9bd48595b3f372299bddbb0 (diff)
downloadglibc-1fabdb99084df004f7f4cdc7068d1be209a258be.tar.gz
glibc-1fabdb99084df004f7f4cdc7068d1be209a258be.tar.xz
glibc-1fabdb99084df004f7f4cdc7068d1be209a258be.zip
x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397]
Since legacy bitmap doesn't cover jitted code generated by legacy JIT
engine, it isn't very useful.  This patch removes ARCH_CET_LEGACY_BITMAP
and treats indirect branch tracking similar to shadow stack by removing
legacy bitmap support.

Tested on CET Linux/x86-64 and non-CET Linux/x86-64.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86')
-rw-r--r--sysdeps/unix/sysv/linux/x86/dl-cet.h20
-rw-r--r--sysdeps/unix/sysv/linux/x86/include/asm/prctl.h5
2 files changed, 0 insertions, 25 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/dl-cet.h b/sysdeps/unix/sysv/linux/x86/dl-cet.h
index 9b2aaa238c..ae97a433a2 100644
--- a/sysdeps/unix/sysv/linux/x86/dl-cet.h
+++ b/sysdeps/unix/sysv/linux/x86/dl-cet.h
@@ -19,26 +19,6 @@
 #include <asm/prctl.h>
 
 static inline int __attribute__ ((always_inline))
-dl_cet_allocate_legacy_bitmap (unsigned long *legacy_bitmap)
-{
-  /* Allocate legacy bitmap.  */
-#ifdef __LP64__
-  return (int) INTERNAL_SYSCALL_CALL (arch_prctl,
-				      ARCH_CET_LEGACY_BITMAP, legacy_bitmap);
-#else
-  unsigned long long legacy_bitmap_u64[2];
-  int res = INTERNAL_SYSCALL_CALL (arch_prctl,
-				   ARCH_CET_LEGACY_BITMAP, legacy_bitmap_u64);
-  if (res == 0)
-    {
-      legacy_bitmap[0] = legacy_bitmap_u64[0];
-      legacy_bitmap[1] = legacy_bitmap_u64[1];
-    }
-  return res;
-#endif
-}
-
-static inline int __attribute__ ((always_inline))
 dl_cet_disable_cet (unsigned int cet_feature)
 {
   return (int) INTERNAL_SYSCALL_CALL (arch_prctl, ARCH_CET_DISABLE,
diff --git a/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h b/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h
index f67f3299b9..45ad0b052f 100644
--- a/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h
+++ b/sysdeps/unix/sysv/linux/x86/include/asm/prctl.h
@@ -24,9 +24,4 @@
      OUT: allocated shadow stack address: *addr.
  */
 # define ARCH_CET_ALLOC_SHSTK	0x3004
-/* Return legacy region bitmap info in unsigned long long *addr:
-     address: addr[0].
-     size: addr[1].
- */
-# define ARCH_CET_LEGACY_BITMAP	0x3005
 #endif /* ARCH_CET_STATUS */