Skip to content

CFI: Add a salt attribute to Clang to differentiate identical function prototypes #1736

@samitolvanen

Description

@samitolvanen

@lvwr reminded me about adding a way to Clang to differentiate between identical function prototypes:

As suggested by Andy Cooper, add a salt attribute that allows to differentiate hashes of functions with the same prototype.

A simple type attribute along the lines of __attribute__((cfi_salt("string"))) would do here, for example. The same attribute could be used for both Clang CFI and KCFI.

cc @kees

Metadata

Metadata

Assignees

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