lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Feb 2017 16:45:41 -0800
From:   Yu-cheng Yu <yu-cheng.yu@...el.com>
To:     Rik van Riel <riel@...hat.com>
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org, luto@...nel.org,
        dave.hansen@...ux.intel.com, bp@...e.de, hpa@...or.com
Subject: Re: [PATCH v2] x86/fpu: copy MXCSR & MXCSR_FLAGS with SSE/YMM state

On Thu, Feb 09, 2017 at 06:43:47PM -0500, Rik van Riel wrote:
>  /*
> + * Weird legacy quirk: SSE and YMM states store information in the
> + * MXCSR and MXCSR_FLAGS fields of the FP area. That means if the FP
> + * area is marked as unused in the xfeatures header, we need to copy
> + * MXCSR and MXCSR_FLAGS if either SSE or YMM are in use.
> + */
> +static inline bool xfeatures_need_mxcsr_copy(u64 xfeatures)
> +{
> +	if (!(xfeatures & (XFEATURE_MASK_SSE|XFEATURE_MASK_YMM)))
> +		return 0;
> +
> +	if (xfeatures & XFEATURE_MASK_FP)
> +		return 0;
> +
> +	return 1;
> +}

Would you consider separating MXCSR & MXCSR_FLAGS from
XFEATURE_MASK_FP.  Here we assume if both xstate[0] and xstate[1]
are being copied, then there is no need to copy MXCSR/MXCSR_FLAGS
again.  What if only xstate[0] is copied and MXCSR/MXCSR_FLAGS
is invalid?

Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ