Most patch merges inspired from patrick's work on base-clang. Consumer ports fixed/marked BROKEN as discussed with bcallah@ and rsadowski@. powerpc tests and PLIST fixes from cwen@, thanks! rust-1.36 tests by semarie@
23 lines
925 B
Plaintext
23 lines
925 B
Plaintext
$OpenBSD: patch-lib_Target_X86_X86_h,v 1.3 2019/07/06 15:06:36 jca Exp $
|
|
|
|
Add a clang pass that identifies potential ROP gadgets and replaces ROP
|
|
friendly instructions with safe alternatives. This initial commit fixes
|
|
3 instruction forms that will lower to include a c3 (return) byte.
|
|
Additional problematic instructions can be fixed incrementally using
|
|
this framework.
|
|
|
|
Index: lib/Target/X86/X86.h
|
|
--- lib/Target/X86/X86.h.orig
|
|
+++ lib/Target/X86/X86.h
|
|
@@ -115,6 +115,10 @@ FunctionPass *createX86FixupBWInsts();
|
|
/// to another, when profitable.
|
|
FunctionPass *createX86DomainReassignmentPass();
|
|
|
|
+/// Return a Machine Function pass that attempts to replace
|
|
+/// ROP friendly instructions with alternatives.
|
|
+FunctionPass *createX86FixupGadgetsPass();
|
|
+
|
|
/// This pass replaces EVEX encoded of AVX-512 instructiosn by VEX
|
|
/// encoding when possible in order to reduce code size.
|
|
FunctionPass *createX86EvexToVexInsts();
|