Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing module flags for CFI and KCFI sanitizers #129373

Merged
merged 1 commit into from
Aug 22, 2024

Commits on Aug 21, 2024

  1. Add missing module flags for CFI and KCFI sanitizers

    Set the cfi-normalize-integers and kcfi-offset module flags when
    Control-Flow Integrity sanitizers are used, so functions generated by
    the LLVM backend use the same CFI/KCFI options as rustc.
    
    cfi-normalize-integers tells LLVM to also use integer normalization
    for generated functions when -Zsanitizer-cfi-normalize-integers is
    used.
    
    kcfi-offset specifies the number of prefix nops between the KCFI
    type hash and the function entry when -Z patchable-function-entry is
    used. Note that LLVM assumes all indirectly callable functions use the
    same number of prefix NOPs with -Zsanitizer=kcfi.
    samitolvanen committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    40f1d9d View commit details
    Browse the repository at this point in the history