[HWASan] Port HWASan to Linux x86-64 (LLVM)
authorAlex Shlyapnikov <alekseys@google.com>
Fri, 23 Mar 2018 17:57:54 +0000 (17:57 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Fri, 23 Mar 2018 17:57:54 +0000 (17:57 +0000)
commit83e78414192f2270473b8d54e737b8b9f2af0477
treeeabbc9dceadfa9a19876afb7a20b53a9b8e76bb8
parent41573804f278a6ff3bbc43217c6d4b3bb415df73
[HWASan] Port HWASan to Linux x86-64 (LLVM)

Summary:
Porting HWASan to Linux x86-64, first of the three patches, LLVM part.

The approach is similar to ARM case, trap signal is used to communicate
memory tag check failure. int3 instruction is used to generate a signal,
access parameters are stored in nop [eax + offset] instruction immediately
following the int3 one.

One notable difference is that x86-64 has to untag the pointer before use
due to the lack of feature comparable to ARM's TBI (Top Byte Ignore).

Reviewers: eugenis

Subscribers: kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D44699

llvm-svn: 328342
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/test/Instrumentation/HWAddressSanitizer/X86/atomic.ll [new file with mode: 0644]
llvm/test/Instrumentation/HWAddressSanitizer/X86/basic.ll [new file with mode: 0644]
llvm/test/Instrumentation/HWAddressSanitizer/X86/kernel.ll [new file with mode: 0644]
llvm/test/Instrumentation/HWAddressSanitizer/X86/with-calls.ll [new file with mode: 0644]