LLVM: lib/Transforms/Instrumentation/HWAddressSanitizer.cpp File Reference (original) (raw)

This file is a part of HWAddressSanitizer, an address basic correctness checker based on tagged addressing. More...

Variables

const char

kHwasanModuleCtorName [] = "hwasan.module_ctor"

const char

kHwasanNoteName [] = "hwasan.note"

const char

kHwasanInitName [] = "__hwasan_init"

const char

kHwasanPersonalityThunkName [] = "__hwasan_personality_thunk"

const char

kHwasanShadowMemoryDynamicAddress []

static const size_t

kNumberOfAccessSizes = 5

static const size_t

kDefaultShadowScale = 4

static const unsigned

kShadowBaseAlignment = 32

static cl::opt< std::string >

ClMemoryAccessCallbackPrefix ("hwasan-memory-access-callback-prefix", cl::desc("Prefix for memory access callbacks"), cl::Hidden, cl::init("__hwasan_"))

static cl::opt< bool >

ClKasanMemIntrinCallbackPrefix ("hwasan-kernel-mem-intrinsic-prefix", cl::desc("Use prefix for memory intrinsics in KASAN mode"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClInstrumentWithCalls ("hwasan-instrument-with-calls", cl::desc("instrument reads and writes with callbacks"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClInstrumentReads ("hwasan-instrument-reads", cl::desc("instrument read instructions"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClInstrumentWrites ("hwasan-instrument-writes", cl::desc("instrument write instructions"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClInstrumentAtomics ("hwasan-instrument-atomics", cl::desc("instrument atomic instructions (rmw, cmpxchg)"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClInstrumentByval ("hwasan-instrument-byval", cl::desc("instrument byval arguments"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClRecover ("hwasan-recover", cl::desc("Enable recovery mode (continue-after-error)."), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClInstrumentStack ("hwasan-instrument-stack", cl::desc("instrument stack (allocas)"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClUseStackSafety ("hwasan-use-stack-safety", cl::Hidden, cl::init(true), cl::Hidden, cl::desc("Use Stack Safety analysis results"), cl::Optional)

static cl::opt< size_t >

ClMaxLifetimes ("hwasan-max-lifetimes-for-alloca", cl::Hidden, cl::init(3), cl::ReallyHidden, cl::desc("How many lifetime ends to handle for a single alloca."), cl::Optional)

static cl::opt< bool >

ClUseAfterScope ("hwasan-use-after-scope", cl::desc("detect use after scope within function"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClGenerateTagsWithCalls ("hwasan-generate-tags-with-calls", cl::desc("generate new tags with runtime library calls"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClGlobals ("hwasan-globals", cl::desc("Instrument globals"), cl::Hidden, cl::init(false))

static cl::opt< int >

ClMatchAllTag ("hwasan-match-all-tag", cl::desc("don't report bad accesses via pointers with this tag"), cl::Hidden, cl::init(-1))

static cl::opt< bool >

ClEnableKhwasan ("hwasan-kernel", cl::desc("Enable KernelHWAddressSanitizer instrumentation"), cl::Hidden, cl::init(false))

static cl::opt< uint64_t >

ClMappingOffset ("hwasan-mapping-offset", cl::desc("HWASan shadow mapping offset [EXPERIMENTAL]"), cl::Hidden)

static cl::opt< OffsetKind >

ClMappingOffsetDynamic ("hwasan-mapping-offset-dynamic", cl::desc("HWASan shadow mapping dynamic offset location"), cl::Hidden, cl::values(clEnumValN(OffsetKind::kGlobal, "global", "Use global"), clEnumValN(OffsetKind::kIfunc, "ifunc", "Use ifunc global"), clEnumValN(OffsetKind::kTls, "tls", "Use TLS")))

static cl::opt< bool >

ClFrameRecords ("hwasan-with-frame-record", cl::desc("Use ring buffer for stack allocations"), cl::Hidden)

static cl::opt< int >

ClHotPercentileCutoff ("hwasan-percentile-cutoff-hot", cl::desc("Hot percentile cutoff."))

static cl::opt< float >

ClRandomSkipRate ("hwasan-random-rate", cl::desc("Probability value in the range [0.0, 1.0] " "to keep instrumentation of a function."))

static cl::opt< RecordStackHistoryMode >

ClRecordStackHistory ("hwasan-record-stack-history", cl::desc("Record stack frames with tagged allocations in a thread-local " "ring buffer"), cl::values(clEnumVal(none, "Do not record stack ring history"), clEnumVal(instr, "Insert instructions into the prologue for " "storing into the stack ring buffer directly"), clEnumVal(libcall, "Add a call to __hwasan_add_frame_record for " "storing into the stack ring buffer")), cl::Hidden, cl::init(instr))

static cl::opt< bool >

ClInstrumentMemIntrinsics ("hwasan-instrument-mem-intrinsics", cl::desc("instrument memory intrinsics"), cl::Hidden, cl::init(true))

static cl::opt< bool >

ClInstrumentLandingPads ("hwasan-instrument-landing-pads", cl::desc("instrument landing pads"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClUseShortGranules ("hwasan-use-short-granules", cl::desc("use short granules in allocas and outlined checks"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClInstrumentPersonalityFunctions ("hwasan-instrument-personality-functions", cl::desc("instrument personality functions"), cl::Hidden)

static cl::opt< bool >

ClInlineAllChecks ("hwasan-inline-all-checks", cl::desc("inline all checks"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClInlineFastPathChecks ("hwasan-inline-fast-path-checks", cl::desc("inline all checks"), cl::Hidden, cl::init(false))

static cl::opt< bool >

ClUsePageAliases ("hwasan-experimental-use-page-aliases", cl::desc("Use page aliasing in HWASan"), cl::Hidden, cl::init(false))

This file is a part of HWAddressSanitizer, an address basic correctness checker based on tagged addressing.

Definition in file HWAddressSanitizer.cpp.