https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>:

https://gcc.gnu.org/g:2f4f7de787e5844515d27b2269fc472f95a9916a

commit r13-744-g2f4f7de787e5844515d27b2269fc472f95a9916a
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Fri Mar 11 12:51:34 2022 -0800

    x86: Document -mcet-switch

    When -fcf-protection=branch is used, the compiler will generate jump
    tables for switch statements where the indirect jump is prefixed with
    the NOTRACK prefix, so it can jump to non-ENDBR targets.  Since the
    indirect jump targets are generated by the compiler and stored in
    read-only memory, this does not result in a direct loss of hardening.
    But if the jump table index is attacker-controlled, the indirect jump
    may not be constrained by CET.

    Document -mcet-switch to generate jump tables for switch statements with
    ENDBR and skip the NOTRACK prefix for indirect jump.  This option should
    be used when the NOTRACK prefix is disabled.

            PR target/104816
            * config/i386/i386.opt: Remove Undocumented.
            * doc/invoke.texi: Document -mcet-switch.
  • [Bug target/104816] -fcf-protec... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to