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: <483610DA.7010606@zytor.com>
Date:	Thu, 22 May 2008 17:33:30 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Mikael Pettersson <mikpe@...uu.se>
CC:	Suresh Siddha <suresh.b.siddha@...el.com>,
	Andi Kleen <andi@...stfloor.org>, mingo@...e.hu,
	tglx@...utronix.de, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, roland@...hat.com, drepper@...hat.com,
	Hongjiu.lu@...el.com, linux-kernel@...r.kernel.org,
	arjan@...ux.intel.com, rmk+lkml@....linux.org.uk, dan@...ian.org,
	asit.k.mallick@...el.com
Subject: Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions

Mikael Pettersson wrote:
> 
>  > > While restoring from the user, kernel also need to find out what layout
>  > > the user is passing. So it's bi-directional. I prefer the same mechanism
>  > > (using cookies/magic numbers etc inaddition to uc_flags or cpuid checks) to
>  > > interpret the fpstate for both user/kernel.
>  > 
>  > No, it really doesn't: the kernel only needs to be able to read the same 
>  > format as it itself wrote.
> 
> The kernel needs to accept one(*) of the formats it can produce, which
> is not necessarily what it last produced. It's not inconceivable that
> user-space will construct sigframes on the fly (to emulate setcontext),
> or that it will mangle sigframes (e.g. to map non-rt to rt before sigreturn).
> 
> (*) The format is determined by which version of sys_sigreturn the
> user invokes.
> 

No.  You CANNOT restore from a frame that doesn't have the full state - 
you don't have enough information to do so!

	-hpa

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