RFC: Shadow Stack support in glibc

Paul Eggert eggert@cs.ucla.edu
Mon Jun 5 22:41:00 GMT 2017


On 06/05/2017 02:36 PM, H.J. Lu wrote:
> 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.

The latter sounds simpler. Do you know of applications that would 
benefit from the former?

By "disallow" do you mean that getcontext and makecontext return -1 and 
set errno to ENOTSUP, or were you thinking of something else?

> 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?

What would this new set of functions look like, and how would one modify 
an application to use them? If getcontext/etc. are rarely used it might 
not be worth designing replacements.



More information about the Libc-alpha mailing list