clang-randstruct / llvm-project

Randomize the order of fields in a structure layout as a compile-time hardening feature
3 stars 1 forks source link

Add support for __randomize_layout #7

Closed connorkuehl closed 5 years ago

connorkuehl commented 5 years ago

Is your feature request related to a problem? Please describe. Our minimum viable product requires that application programmers opt-in to have their structures laid out randomly.

Describe the solution you'd like When Clang hands control to our plugin, we will check if the structure has the __randomize_layout attribute attached to it. If not, we will return false; and allow Clang to lay it out. If it does have the attribute, we will lay it out.

tim-pugh commented 5 years ago

This will depend on #100 first, but this is the much more important issue.

I would finish off #100, branch and then develop this patch. We need to test that our plugin works with Clang V9 first.

connorkuehl commented 5 years ago

Closed by the following commits:

9b0f3deecafd42731e156653044764e06c970cf7 4ff065bf33a8ac81d32898fe6d636ec92f0eae0c