1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Go to file
Joao Moreira 3755e8a85b [X86] Check if call is indirect before emitting NT_CALL
The notrack prefix is a relaxation of CET policies which makes it possible to indirectly call targets which do not have an ENDBR instruction in the landing address. To emit a call with this prefix, the special attribute "nocf_check" is used. When used as a function attribute, a CallInst targeting the respective function will return true for the method "doesNoCfCheck()", no matter if it is a direct call (and such should remain like this, as the information that the to-be-called function won't perform control-flow checks is useful in other contexts). Yet, when emitting an X86ISD::NT_CALL, the respective CallInst should be verified for its indirection, allowing that the prefixed calls are only emitted in the right situations.

Update the respective testing unit to also verify for direct calls to functions with ''nocf_check'' attributes.

The bug can also be reproduced through compiling the following C code using the -fcf-protection=full flag.

int __attribute__((nocf_check)) foo(int a) {};

int main() {
  foo(42);
}

Differential Revision: https://reviews.llvm.org/D87320
2020-10-09 15:54:23 -07:00
benchmarks
bindings [bindings/go] Fix TestAttributes after D88241 2020-09-25 20:31:45 -07:00
cmake [cmake] Fix cmake warning in standalone compiler-rt builds. 2020-10-08 09:49:14 +01:00
docs Introduce and use a new section type for the bb_addr_map section. 2020-10-08 11:13:19 -07:00
examples [ORC][examples] Temporarily remove LLJITWithChildProcess until ORC TPC lands 2020-10-01 10:25:13 +02:00
include Temporarily revert "[ThinLTO] Re-order modules for optimal multi-threaded processing" 2020-10-09 14:36:20 -07:00
lib [X86] Check if call is indirect before emitting NT_CALL 2020-10-09 15:54:23 -07:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes [CMake] Don't use CMakePushCheckState 2020-10-02 17:13:34 -07:00
test [X86] Check if call is indirect before emitting NT_CALL 2020-10-09 15:54:23 -07:00
tools [DWARFYAML] Make the opcode_base and the standard_opcode_lengths fields optional. 2020-10-09 11:10:03 +08:00
unittests [Fixed Point] Add floating point methods to APFixedPoint. 2020-10-09 10:27:42 +02:00
utils [gn build] Port 0741a2c9cac 2020-10-09 13:54:24 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' 2020-07-07 14:53:45 +02:00
CMakeLists.txt Guard find_library(tensorflow_c_api ...) by checking for TENSORFLOW_C_LIB_PATH to be set by the user 2020-09-28 22:15:55 +00:00
CODE_OWNERS.TXT Update PowerPC backend ownership in CODE_OWNERS.TXT 2020-09-14 15:45:57 -05:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT [NFC] Add contributors names to CREDITS.TXT 2020-10-07 13:22:55 -04:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.