[Xenomai] Eager FPU vs. recent kernels

Philippe Gerum rpm at xenomai.org
Mon Jul 16 16:48:53 CEST 2018


On 07/13/2018 02:37 PM, Henning Schild wrote:
> Am Mon, 9 Jul 2018 19:48:28 +0200
> schrieb Jan Kiszka <jan.kiszka at siemens.com>:
> 
>> Hi,
>>
>> the x86 FPU changes that so far only affected 4.14 and delayed its
>> ipipe progress on that arch. However, CVE-2018-3665 is not making it
>> a topic for every ipipe kernel (that should be kept up to date): lazy
>> FPU is history, now also for security reasons (before that only for
>> performance reasons).
> 
> I have just reached that point in the 4.14 x86 work. And from what i
> can see right now is that it would be a good idea to look into the FPU
> thing independent of 4.14. So i will start working on that for 4.9 and
> probably 4.4 to understand what 4.14 needs.
> 

The Spectre mitigation code in 4.14 will require to use the regular
__switch_to infrastructure for context switching, there are several key
changes in entry_64.S which call for this. This should send fpu
management over the head stage back to the pipeline core where it
belongs, instead of open coding it into Cobalt for x86. At the end of
the day, I believe that this should greatly simplify the implementation
both on the I-pipe and Cobalt sides.

PS: still bringing up I-pipe x86 on 4.14 piece by piece, based on a
fully incremental commit stack. I'm able to boot the basic pipeline
stuff by only introducing the virtual interrupt state management over
KVM at the moment. Still some work ahead for adding the rest of the
changes involving task migration to the head stage and notifiers. I'll
stop before fpu handling and Cobalt port to 4.14.

-- 
Philippe.



More information about the Xenomai mailing list