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] [day] [month] [year] [list]
Message-ID: <20080305143634.GB16477@elte.hu>
Date:	Wed, 5 Mar 2008 15:36:34 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jan Beulich <jbeulich@...ell.com>
Cc:	tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
	Roland McGrath <roland@...hat.com>
Subject: Re: [PATCH] i386: fix merge mistake in i387.c


* Jan Beulich <jbeulich@...ell.com> wrote:

> convert_fxsr_to_user() in 2.6.24's i387_32.c did this, and 
> convert_to_fxsr() also does the inverse, so I assume it's an oversight 
> that it is no longer being done.

thanks Jan, applied.

> -	env->fcs = fxsave->fcs;
> +	env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16);

we encode it this way because there's no space for the 'FPU Last 
Instruction Opcode' (->fop) field in the legacy user_i387_ia32_struct 
that ptrace PTRACE_GETFPREGS/PTRACE_SETFPREGS uses.

it's probably pure legacy - i'd be surprised if any user-space relied on 
the FPU Last Opcode in any way. But indeed we used to do it previously 
so the most conservative thing is to preserve that piece of information.

FXRESTORE ignores the FOP field so the "restore" direction is 
meaningless:

    fxsave->fop = (u16) ((u32) env->fcs >> 16);

	Ingo
--
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