RFC: Shadow Stack support in glibc

H.J. Lu hjl.tools@gmail.com
Mon Jun 5 21:36:00 GMT 2017


To support Shadow Stack in Intel Control-flow Enforcement Technology (CET)
instructions:

https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf

Most of glibc functions are compatible with Shadow Stack, except for

1. setjmp/longjmp need to be extended to support Shadow Stack.
2. getcontext/setcontext may be extended to support Shadow Stack.
3. makecontext/swapcontext are hard to support Shadow Stack.

To enable Shadow Stack in glibc, there are 2 approaches:

1. Only support Shadow Stack in getcontext/setcontext and disallow
makecontext/swapcontext when Shadow Stack is used.
2. Disallow getcontext/setcontext/makecontext/swapcontext when
when Shadow Stack is used.

If we decide to disallow getcontext/setcontext/makecontext/swapcontext
when Shadow Stack is used, should we add a new set of functions
compatible with Shadow Stack to manipulate user context?


-- 
H.J.



More information about the Libc-alpha mailing list