Re: [PATCH Bugfix v2 2/4] x86/xsaves: Define and use user_xstate_size for xstate size in signal context

From: Dave Hansen
Date: Thu Apr 23 2015 - 17:32:13 EST


On 04/23/2015 10:09 AM, Yu, Fenghua wrote:
>> > If those untouched fields of the xsave buffer are in the "init state", then
>> > we've got no problem. But, are those "untouched since (1)" fields in the
>> > kernel xsave buf *GUARANTEED* to be in the init state?
> In fact, those untouched fields in kernel xsave buf "IS GUARANTEED" to be in
> the init state.
>
> Please check __sanitize_i387_state() called just before copy_to_user_xstate().
> That functions GUARANTEES the untouched fields in kernel xsave buf to be in
> init state.

OK, that makes sense. Other than the horribly-named
sanitize_i387_state(). :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/