Re: [tip:x86/fpu] x86/fpu: Fault-in user stack if copy_fpstate_to_sigframe() fails

From: Dave Hansen
Date: Tue Apr 30 2019 - 10:20:33 EST


On 4/29/19 11:52 AM, tip-bot for Sebastian Andrzej Siewior wrote:
> Instead of utilizing copy_xstate_to_user(), fault-in the user memory
> and retry the fast path. Ideally, the fast path succeeds on the second
> attempt but may be retried again if the memory is swapped out due
> to memory pressure. If the user memory can not be faulted-in then
> get_user_pages() returns an error so we don't loop forever.
>
> Fault in memory via get_user_pages() so copy_fpregs_to_sigframe()
> succeeds without a fault.

Thanks for reworking this. It looks great.

Acked-by: Dave Hansen <dave.hansen@xxxxxxxxx>