diff options
Diffstat (limited to 'lib/mesa/src/gallium')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c | 2 | ||||
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 | ||||
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c index c9e24b8d6..ea8a22f70 100644 --- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -361,7 +361,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, #endif #if DETECT_ARCH_AARCH64 - lp_set_module_branch_target_enforcement(gallivm->module); + lp_set_module_branch_protection(gallivm->module); #endif gallivm->builder = LLVMCreateBuilderInContext(gallivm->context); diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index a1caece3e..b50a17427 100644 --- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -636,10 +636,12 @@ lp_set_module_stack_alignment_override(LLVMModuleRef MRef, unsigned align) } extern "C" void -lp_set_module_branch_target_enforcement(LLVMModuleRef MRef) +lp_set_module_branch_protection(LLVMModuleRef MRef) { + /* Enable standard (bti+pac-ret) branch protection */ llvm::Module *M = llvm::unwrap(MRef); M->addModuleFlag(llvm::Module::Override, "branch-target-enforcement", 1); + M->addModuleFlag(llvm::Module::Override, "sign-return-address", 1); } using namespace llvm; diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.h index 2447bffef..fd6a4c343 100644 --- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.h +++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_misc.h @@ -96,7 +96,7 @@ void lp_set_module_stack_alignment_override(LLVMModuleRef M, unsigned align); void -lp_set_module_branch_target_enforcement(LLVMModuleRef M); +lp_set_module_branch_protection(LLVMModuleRef M); #ifdef __cplusplus } |