Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support

2021-03-19 Thread Yu, Yu-cheng
On 3/19/2021 2:28 AM, Borislav Petkov wrote: On Thu, Mar 18, 2021 at 12:05:58PM -0700, Yu, Yu-cheng wrote: Maybe I would add comments here. Yap. Also, looking forward in the set, I see prctl_set() and that is also done on current so should be ok. In any case, yes, documenting the assumptions

Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support

2021-03-19 Thread Borislav Petkov
On Thu, Mar 18, 2021 at 12:05:58PM -0700, Yu, Yu-cheng wrote: > Maybe I would add comments here. Yap. Also, looking forward in the set, I see prctl_set() and that is also done on current so should be ok. In any case, yes, documenting the assumptions and expectations wrt current here is a good id

Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support

2021-03-18 Thread Yu, Yu-cheng
On 3/18/2021 5:32 AM, Borislav Petkov wrote: Subject: Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support ^ Add On Tue, Mar 16, 2021 at 08:10:48AM -0700, Yu-cheng Yu wrote

Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support

2021-03-18 Thread Borislav Petkov
> Subject: Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support ^ Add On Tue, Mar 16, 2021 at 08:10:48AM -0700, Yu-cheng Yu wrote: > Introduce basic shadow stack enabling/dis

[PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support

2021-03-16 Thread Yu-cheng Yu
Introduce basic shadow stack enabling/disabling/allocation routines. A task's shadow stack is allocated from memory with VM_SHSTK flag and has a fixed size of min(RLIMIT_STACK, 4GB). Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook --- arch/x86/include/asm/cet.h | 28 ++ arch/x86/in