<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/xsave.c, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-04-20T21:33:00Z</updated>
<entry>
<title>x86-64: fix FPU corruption with signals and preemption</title>
<updated>2009-04-20T21:33:00Z</updated>
<author>
<name>Suresh Siddha</name>
</author>
<published>2009-04-09T22:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06c38d5e36b12d040839ff224e805146c0368556'/>
<id>urn:sha1:06c38d5e36b12d040839ff224e805146c0368556</id>
<content type='text'>
In 64bit signal delivery path, clear_used_math() was happening before saving
the current active FPU state on to the user stack for signal handling. Between
clear_used_math() and the state store on to the user stack, potentially we
can get a page fault for the user address and can block. Infact, while testing
we were hitting the might_fault() in __clear_user() which can do a schedule().

At a later point in time, we will schedule back into this process and
resume the save state (using "xsave/fxsave" instruction) which can lead
to DNA fault. And as used_math was cleared before, we will reinit the FP state
in the DNA fault and continue. This reinit will result in loosing the
FPU state of the process.

Move clear_used_math() to a point after the FPU state has been stored
onto the user stack.

This issue is present from a long time (even before the xsave changes
and the x86 merge). But it can easily be exposed in 2.6.28.x and 2.6.29.x
series because of the __clear_user() in this path, which has an explicit
__cond_resched() leading to a context switch with CONFIG_PREEMPT_VOLUNTARY.

[ Impact: fix FPU state corruption ]

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Cc: &lt;stable@kernel.org&gt;			[2.6.28.x, 2.6.29.x]
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: add linux kernel support for YMM state</title>
<updated>2009-04-12T11:08:56Z</updated>
<author>
<name>Suresh Siddha</name>
</author>
<published>2009-04-10T22:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a30469e7921a6dd2067e9e836d7787cfa0105627'/>
<id>urn:sha1:a30469e7921a6dd2067e9e836d7787cfa0105627</id>
<content type='text'>
Impact: save/restore Intel-AVX state properly between tasks

Intel Advanced Vector Extensions (AVX) introduce 256-bit vector processing
capability. More about AVX at http://software.intel.com/sites/avx

Add OS support for YMM state management using xsave/xrstor infrastructure
to support AVX.

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
LKML-Reference: &lt;1239402084.27006.8057.camel@localhost.localdomain&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: xsave.c: restore_user_xstate should be static</title>
<updated>2008-12-30T21:31:41Z</updated>
<author>
<name>Jaswinder Singh Rajput</name>
</author>
<published>2008-12-30T16:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7820b75643a763abf595c99fab963000ffc8b5f0'/>
<id>urn:sha1:7820b75643a763abf595c99fab963000ffc8b5f0</id>
<content type='text'>
Impact: cleanup, reduce kernel size a bit, avoid sparse warning

Fixes sparse warning:
arch/x86/kernel/xsave.c:162:5: warning: symbol 'restore_user_xstate' was not declared. Should it be static?

Signed-off-by: Jaswinder Singh Rajput &lt;jaswinderrajput@gmail.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86: fixing __cpuinit/__init tangle, xsave_cntxt_init()</title>
<updated>2008-11-20T15:43:42Z</updated>
<author>
<name>Rakib Mullick</name>
</author>
<published>2008-11-20T13:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfe085f62f98a49e1b864e4950389c7205174e4f'/>
<id>urn:sha1:bfe085f62f98a49e1b864e4950389c7205174e4f</id>
<content type='text'>
Annotate xsave_cntxt_init() as "can be called outside of __init".

Signed-off-by: Rakib Mullick &lt;rakib.mullick@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: make variables static</title>
<updated>2008-10-22T05:31:28Z</updated>
<author>
<name>roel kluin</name>
</author>
<published>2008-10-21T23:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bcad30f2e6d4c20f7e71d2e2ac77acc0f0931e5'/>
<id>urn:sha1:8bcad30f2e6d4c20f7e71d2e2ac77acc0f0931e5</id>
<content type='text'>
These variables are only used in their source files, so make them static.

Signed-off-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86, fpu: check __clear_user() return value</title>
<updated>2008-10-12T13:17:39Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2008-08-18T10:59:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f482807a6bd7e2aa1ed0d8cfc48463ec4ca3568'/>
<id>urn:sha1:9f482807a6bd7e2aa1ed0d8cfc48463ec4ca3568</id>
<content type='text'>
fix warning:

  arch/x86/kernel/xsave.c: In function ‘save_i387_xstate’:
  arch/x86/kernel/xsave.c:98: warning: ignoring return value of ‘__clear_user’, declared with attribute warn_unused_result

check the return value and act on it. We should not be ignoring faults
at this point.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86: xsave: set FP, SSE bits in the xsave header in the user sigcontext</title>
<updated>2008-10-07T21:36:08Z</updated>
<author>
<name>Suresh Siddha</name>
</author>
<published>2008-10-07T21:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04944b793e18ece23f63c0252646b310c1845940'/>
<id>urn:sha1:04944b793e18ece23f63c0252646b310c1845940</id>
<content type='text'>
If a processor implementation discern that a processor state component is in
its initialized state, it may modify the corresponding bit in the
xsave header.xstate_bv as '0'. State in the memory layout setup by 'xsave'
will be consistent with the bit values in the header.

During signal handling, legacy applications may change the FP/SSE bits
in the sigcontext memory layout without touching the FP/SSE header bits
in the xsave header. So always set FP/SSE bits in the xsave header
while saving the sigcontext state to the user space. During signal return,
this will enable the kernel to capture any changes to the FP/SSE bits by the
legacy applications which don't touch xsave headers.

xsave aware apps can change the xstate_bv in the xsave header aswell
as change any contents in the memory layout. xrestor as part of sigreturn
will capture all the changes.

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86: xsave: fix error condition in save_i387_xstate()</title>
<updated>2008-10-07T21:36:01Z</updated>
<author>
<name>Suresh Siddha</name>
</author>
<published>2008-10-07T21:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f364eadab59b316ea0bd9f9bc01af0ad89065569'/>
<id>urn:sha1:f364eadab59b316ea0bd9f9bc01af0ad89065569</id>
<content type='text'>
Actually return failure on error.

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86: make setup_xstate_init() __init</title>
<updated>2008-09-06T17:01:18Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-08-30T02:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a19aac8548d85cf15d744335b8e82201da760d80'/>
<id>urn:sha1:a19aac8548d85cf15d744335b8e82201da760d80</id>
<content type='text'>
WARNING: vmlinux.o(.text+0x22453): Section mismatch in reference from the function setup_xstate_init() to the function .init.text:__alloc_bootmem()
The function setup_xstate_init() references the function __init __alloc_bootmem().
This is often because setup_xstate_init lacks a __init annotation or the annotation of __alloc_bootmem is wrong.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86, xsave: use BUG_ON() instead of BUILD_BUG_ON()</title>
<updated>2008-08-14T08:56:07Z</updated>
<author>
<name>Suresh Siddha</name>
</author>
<published>2008-08-13T18:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f65bc214e042916135256620f900e9599d65e0cb'/>
<id>urn:sha1:f65bc214e042916135256620f900e9599d65e0cb</id>
<content type='text'>
All these structure sizes are runtime determined. So use a runtime
bug check.

Signed-off-by: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
