lkml.org 
[lkml]   [2003]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[2.5 Question] Is TIF_USEDFPU cleared for a new process?
In 2.4, this flag is cleared in the common code, copy_flags(), 
when a new process is created. Not so anymore in 2.5. I wonder
if it ever cleared.

I looked at the code (2.5.59) a couple of times and can't seem
to find any place it is cleared for a new process.

Assuming it is not cleared, I am interested in knowing what
would happen, especially in the following scenario:

1) the new process is switched on, runs without using any FPU

2) the new process is switched off. Because the TIF_USEDFPU
is set, it will execute 'fnsave' or 'fxsave'.

a) if FPU is enabled at this moment, we will save bogus FPU
contents back into new process's thread structure.
b) if FPU is not enabled, we will go through the trap, restore
FPU registers from the thread structure, and then save
the same value back into the thread structure again.

Either a) or b) is bad. Is this scenario real or just fictitious?

Please cc your reply to my email address. Thanks.

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

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.032 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site