[PATCH] D37581: Implement pagerando wrapper functions to initialize POT register

Stephen Crane via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 16:32:14 PDT 2018


rinon updated this revision to Diff 140705.
rinon added a comment.

- Only wrap functions marked with pagerando attribute.

  The frontend should now explicitly opt in to pagerando with a function attribute, allowing control of pagerando on a per-function granularity via the existing sanitizer flag infrastructure.
- Refactor replacement of function references with wrappers
- Don't skip aliases when determining pagerando wrappers
- Don't apply pagerando to trivial functions

  Wrapping trivial (single forwarding call) functions results in a large proportional increase in overhead for these functions. Not applying pagerando in this case results in effectively equivalent security, assuming that the trivial function does not contain useful gadgets, since an attacker could reuse the whole function. This optimization can be enabled via a command-line option.
- Rebase


Repository:
  rL LLVM

https://reviews.llvm.org/D37581

Files:
  docs/BitCodeFormat.rst
  docs/LangRef.rst
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Attributes.td
  include/llvm/IR/Function.h
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/IPO.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/Attributes.cpp
  lib/IR/Verifier.cpp
  lib/LTO/LTOBackend.cpp
  lib/Transforms/IPO/CMakeLists.txt
  lib/Transforms/IPO/IPO.cpp
  lib/Transforms/IPO/PagerandoWrappers.cpp
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Transforms/PagerandoWrappers/address-taken.ll
  test/Transforms/PagerandoWrappers/calls.ll
  test/Transforms/PagerandoWrappers/varargs.ll
  test/Transforms/PagerandoWrappers/wrapper-body.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37581.140705.patch
Type: text/x-patch
Size: 32950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/bdca4ff0/attachment.bin>


More information about the llvm-commits mailing list