Skip to content

CFI: Drop !kcfi_type metadata for non-address-taken globals with LTO #1737

@samitolvanen

Description

@samitolvanen

Another feature suggestion from @lvwr:

When LTO is used, hashes may be suppressed for non-local + non-address taken functions.

This would work similarly to ibt-seal. Basically, with LTO we can tell for sure that non-address-taken globals are not indirectly called, which means we can drop the !kcfi_type metadata from them, thus making these functions invalid indirect call targets.

cc @kees

Metadata

Metadata

Assignees

No one assigned

    Labels

    [FEATURE] CFIRelated to building the kernel with Clang Control Flow Integrityfeature-requestNot a bug per-se

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions