SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
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/X86TargetMachine.cpp
|
||||
--- lib/Target/X86/X86TargetMachine.cpp.orig
|
||||
+++ lib/Target/X86/X86TargetMachine.cpp
|
||||
@@ -546,6 +546,7 @@ void X86PassConfig::addPreEmitPass() {
|
||||
addPass(createX86EvexToVexInsts());
|
||||
addPass(createX86DiscriminateMemOpsPass());
|
||||
addPass(createX86InsertPrefetchPass());
|
||||
+ addPass(createX86FixupGadgetsPass());
|
||||
addPass(createX86InsertX87waitPass());
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue