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]
Message-ID: <5540050D.2000008@intel.com>
Date:	Tue, 28 Apr 2015 15:09:17 -0700
From:	Dave Hansen <dave.hansen@...el.com>
To:	Fenghua Yu <fenghua.yu@...el.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Asit K Mallick <asit.k.mallick@...el.com>,
	Glenn Williamson <glenn.p.williamson@...el.com>
CC:	linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH Bugfix v2 2/4] x86/xsaves: Define and use user_xstate_size
 for xstate size in signal context

On 04/21/2015 09:51 PM, Fenghua Yu wrote:
> +	/*
> +	 * Clear xcomp_bv[63] in user's xsave area header to indicate
> +	 * buf_fx is in standard format.
> +	 */
> +	xcomp_bv = xsave->xsave_hdr.xcomp_bv;
> +	user_xsave = buf_fx;
> +	xcomp_bv &= ~((u64)1 << 63);

I ran in to another bug.  xrestor_user() is hitting a #GP with these values:

[    6.258743] xrestore_user() tmp: ffff88003f813000
[    6.261122] 	     XCR0: 000000000000001f
[    6.261868] 	xstate_bv: 0000000000000003
[    6.262613] 	 xcomp_bv: 000000000000001f

I think it is because bit 63 is clear in xcomp_bv, but there are other
bits set in there.

I think the above needs to just do:

	/*
	 * We are uncompacting the state for the user buffer.  We need
	 * to clear out the xcomp_bv field entirely.  The uncompacted
	 * form of xsave/xrstor treats this field as reserved.
	 */
	if (__put_user(0, &user_xsave->xsave_hdr.xcomp_bv))
		return -1;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ