llvm.org GIT mirror llvm / f81a97a
Revert "[clang][slh] add attribute for speculative load hardening" This reverts commit 801eaf91221ba6dd6996b29ff82659ad6359e885. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347588 91177308-0d34-0410-b5e6-96231b3b80d8 Zola Bridges 11 months ago
1 changed file(s) with 13 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
16421642 ``speculative_load_hardening``
16431643 This attribute indicates that
16441644 `Speculative Load Hardening `_
1645 should be enabled for the function body.
1647 Speculative Load Hardening is a best-effort mitigation against
1648 information leak attacks that make use of control flow
1649 miss-speculation - specifically miss-speculation of whether a branch
1650 is taken or not. Typically vulnerabilities enabling such attacks are
1651 classified as "Spectre variant #1". Notably, this does not attempt to
1652 mitigate against miss-speculation of branch target, classified as
1653 "Spectre variant #2" vulnerabilities.
1645 should be enabled for the function body. This is a best-effort attempt to
1646 mitigate all known speculative execution information leak vulnerabilities
1647 that are based on the fundamental principles of modern processors'
1648 speculative execution. These vulnerabilities are classified as "Spectre
1649 variant #1" vulnerabilities typically. Notably, this does not attempt to
1650 mitigate any vulnerabilities where the speculative execution and/or
1651 prediction devices of specific processors can be *completely* undermined
1652 (such as "Branch Target Injection", a.k.a, "Spectre variant #2"). Instead,
1653 this is a target-independent request to harden against the completely
1654 generic risk posed by speculative execution to incorrectly load secret data,
1655 making it available to some micro-architectural side-channel for information
1656 leak. For a processor without any speculative execution or predictors, this
1657 is expected to be a no-op.
16551659 When inlining, the attribute is sticky. Inlining a function that carries
16561660 this attribute will cause the caller to gain the attribute. This is intended