From 9e38f455a6c602be86b7b5a8d6523cbdcd7ec051 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 27 Apr 2020 15:44:07 -0700 Subject: x86: Add --enable-cet=permissive When CET is enabled, it is an error to dlopen a non CET enabled shared library in CET enabled application. It may be desirable to make CET permissive, that is disable CET when dlopening a non CET enabled shared library. With the new --enable-cet=permissive configure option, CET is disabled when dlopening a non CET enabled shared library. Add DEFAULT_DL_X86_CET_CONTROL to config.h.in: /* The default value of x86 CET control. */ #define DEFAULT_DL_X86_CET_CONTROL cet_elf_property which enables CET features based on ELF property note. --enable-cet=permissive it to /* The default value of x86 CET control. */ #define DEFAULT_DL_X86_CET_CONTROL cet_permissive which enables CET features permissively. Update tst-cet-legacy-5a, tst-cet-legacy-5b, tst-cet-legacy-6a and tst-cet-legacy-6b to check --enable-cet and --enable-cet=permissive. --- config.h.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.h.in') diff --git a/config.h.in b/config.h.in index cd7d4df3ed..831eca2fe1 100644 --- a/config.h.in +++ b/config.h.in @@ -259,4 +259,7 @@ in i386 6 argument syscall issue). */ #define CAN_USE_REGISTER_ASM_EBP 0 +/* The default value of x86 CET control. */ +#define DEFAULT_DL_X86_CET_CONTROL cet_elf_property + #endif -- cgit 1.4.1