Intel has this Control-flow Enforcement Technology (CET), as of October 20th 2017 there are no Intel processors currently being sold that support it yet. But it will be available sooner or later- however for now, have fun :)

Control-flow Enforcement Technology aims to prevent return-oriented programming (ROP) and call-jump-oriented programming (COP/JOP) attacks. The Intel-developed technology tries to prevent control-flow attacks by the concept of having a shadow stack to keep track of the expected return addresses and will raise faults if the return addresses does not match what is expected by the shadow stack. CET also has indirect branch tracking for stopping jump/call oriented attacks.

Also noteworthy, I don't see any indication that kernel support would be required, since these instructions that GCC would be using are platform independent and would/could be used on any system we know of.

This will be supported by GCC 8.1, the start of the work for implementing this in GCC can be found at;a=commitdiff;h=3c0f15b4cebccdbb6388a8df5933e69c9b773149.

Mikal Villa

http://meeh.i2p @ I2P.

Oslo, Norway