LLVM 20.0.0git
Macros | Functions
X86LoadValueInjectionRetHardening.cpp File Reference
#include "X86.h"
#include "X86InstrBuilder.h"
#include "X86Subtarget.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/Debug.h"

Go to the source code of this file.

Macros

#define PASS_KEY   "x86-lvi-ret"
 
#define DEBUG_TYPE   PASS_KEY
 

Functions

 STATISTIC (NumFences, "Number of LFENCEs inserted for LVI mitigation")
 
 STATISTIC (NumFunctionsConsidered, "Number of functions analyzed")
 
 STATISTIC (NumFunctionsMitigated, "Number of functions for which mitigations " "were deployed")
 
 INITIALIZE_PASS (X86LoadValueInjectionRetHardeningPass, PASS_KEY, "X86 LVI ret hardener", false, false) FunctionPass *llvm
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   PASS_KEY

Definition at line 34 of file X86LoadValueInjectionRetHardening.cpp.

◆ PASS_KEY

#define PASS_KEY   "x86-lvi-ret"

Definition at line 33 of file X86LoadValueInjectionRetHardening.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( X86LoadValueInjectionRetHardeningPass  ,
PASS_KEY  ,
"X86 LVI ret hardener"  ,
false  ,
false   
)

Definition at line 114 of file X86LoadValueInjectionRetHardening.cpp.

◆ STATISTIC() [1/3]

STATISTIC ( NumFences  ,
"Number of LFENCEs inserted for LVI mitigation"   
)

◆ STATISTIC() [2/3]

STATISTIC ( NumFunctionsConsidered  ,
"Number of functions analyzed"   
)

◆ STATISTIC() [3/3]

STATISTIC ( NumFunctionsMitigated  ,
"Number of functions for which mitigations " "were deployed"   
)