Re: [PATCH 03/10] x86/cet: Signal handling for shadow stack

From: Dave Hansen
Date: Thu Jun 07 2018 - 16:18:47 EST


On 06/07/2018 01:12 PM, Yu-cheng Yu wrote:
>>> +int cet_restore_signal(unsigned long ssp)
>>> +{
>>> + if (!current->thread.cet.shstk_enabled)
>>> + return 0;
>>> + return cet_set_shstk_ptr(ssp);
>>> +}
>> This will blow up if the shadow stack enabled state changes in a
>> signal handler. Maybe we don't care.
> Yes, the task will get a control protection fault.

Sounds like something to add to the very long list of things that are
unwise to do in a signal handler. Great manpage fodder.