[i386] PR81842 [CET] -fcf-protection -mcet is incompatible with makecontext family functions

Tsimbalist, Igor V igor.v.tsimbalist@intel.com
Mon Dec 18 00:05:00 GMT 2017


-fcf-protection -mcet is incompatible with makecontext family functions
since they can't properly set up and destroy shadow stack pointer. This
change provides a mechanism to help detection shadow stack compatibility.
The current proposal is to add -mcheck-shstk-compat option which will
predefine __CHECK_SHSTK_COMPAT__ macro. The option will be
set on by default.  Then we can add a code

#if defined __SHSTK__ && defined __CHECK_SHSTK_COMPAT__
# error This source is incompatible with -mshstk
#endif

to <ucontext.h>.

Ok for trunk?

Igor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-mcheck-shstk-compat.patch
Type: application/octet-stream
Size: 5506 bytes
Desc: 0001-Add-mcheck-shstk-compat.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20171218/0b3fa651/attachment.obj>


More information about the Gcc-patches mailing list