RE: [Linux-ia64] High fpu register corruption

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2003-05-09 02:58:07
>>>>> On Thu, 8 May 2003 09:33:55 -0700, "Mallick, Asit K" <asit.k.mallick@intel.com> said:

  Asit> Andreas, The high FP save and restore in the context switch
  Asit> makes the assumption that user will not be modifying the
  Asit> psr.mfh and it will be only updated by the hardware.

Not a chance.  We can't rely on the application doing the Right Thing.
In fact, having an application clear psr.mfh makes tons of sense,
when it knows it's done using mfh.

  Asit> Without this assumption we can not optimize the FP
  Asit> save/restore for SMP systems (this patch will not cover all
  Asit> cases). If application wants the current high fpu state to be
  Asit> preserved then it should will not be able to modify the
  Asit> psr.mfh.

  Asit> What kind of applications are trying to modify the mfh?

OpenSSL does (really: some underlying crypto code).

I think you're misunderstanding the problem though: the problem is
that application A clears psr.mfh and application B gets its fph state
corrupted.

So, really, this is just a bug that needs fixing.  It won't affect the
rest of the lazy fph save/restore logic.

	--david
Received on Thu May 08 09:59:42 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:14 EST