<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/um/include/shared/registers.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-10-10T10:03:55Z</updated>
<entry>
<title>um: always use the internal copy of the FP registers</title>
<updated>2024-10-10T10:03:55Z</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin.berg@intel.com</email>
</author>
<published>2024-09-13T13:38:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5a6951273e0e9dc0f79facf22281a8a731fb90b1'/>
<id>urn:sha1:5a6951273e0e9dc0f79facf22281a8a731fb90b1</id>
<content type='text'>
When switching from userspace to the kernel, all registers including the
FP registers are copied into the kernel and restored later on. As such,
the true source for the FP register state is actually already in the
kernel and they should never be grabbed from the userspace process.

Change the various places to simply copy the data from the internal FP
register storage area. Note that on i386 the format of PTRACE_GETFPREGS
and PTRACE_GETFPXREGS is different enough that conversion would be
needed. With this patch, -EINVAL is returned if the non-native format is
requested.

The upside is, that this patchset fixes setting registers via ptrace
(which simply did not work before) as well as fixing setting floating
point registers using the mcontext on signal return on i386.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Link: https://patch.msgid.link/20240913133845.964292-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>um: Remove unused register save/restore functions</title>
<updated>2024-01-05T15:28:57Z</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin@sipsolutions.net</email>
</author>
<published>2023-11-10T11:03:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1e41c415e21ff03ddf5c3725b608d0e4f0c239e3'/>
<id>urn:sha1:1e41c415e21ff03ddf5c3725b608d0e4f0c239e3</id>
<content type='text'>
These functions were only used when calling PTRACE_ARCH_PRCTL, but this
code has been removed.

Signed-off-by: Benjamin Berg &lt;benjamin@sipsolutions.net&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: stop polluting the namespace with registers.h contents</title>
<updated>2021-12-21T20:31:35Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2021-09-20T21:32:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dbba7f704aa0c38e36c9908012e7592c8f6efc43'/>
<id>urn:sha1:dbba7f704aa0c38e36c9908012e7592c8f6efc43</id>
<content type='text'>
Only one extern in there is needed in processor-generic.h, and it's
not needed anywhere else.  So move it over there and get rid of
the include in processor-generic.h, adding includes of registers.h
to the few files that need the declarations in it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: registers: Rename function names to avoid conflicts and build problems</title>
<updated>2021-12-21T20:22:19Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2021-09-13T06:12:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=077b7320942b64b0da182aefd83c374462a65535'/>
<id>urn:sha1:077b7320942b64b0da182aefd83c374462a65535</id>
<content type='text'>
The function names init_registers() and restore_registers() are used
in several net/ethernet/ and gpu/drm/ drivers for other purposes (not
calls to UML functions), so rename them.

This fixes multiple build errors.

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Anton Ivanov &lt;anton.ivanov@cambridgegreys.com&gt;
Cc: linux-um@lists.infradead.org
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: Add SPDX headers for files in arch/um/include</title>
<updated>2019-09-15T19:37:17Z</updated>
<author>
<name>Alex Dewar</name>
<email>alex.dewar@gmx.co.uk</email>
</author>
<published>2019-08-25T09:49:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f2f4bf5aabadd6575f5daabcb0a2f506e3f5f68c'/>
<id>urn:sha1:f2f4bf5aabadd6575f5daabcb0a2f506e3f5f68c</id>
<content type='text'>
Convert files to use SPDX header. All files are licensed under the GPLv2.

Signed-off-by: Alex Dewar &lt;alex.dewar@gmx.co.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: add extended processor state save/restore support</title>
<updated>2016-05-21T21:38:06Z</updated>
<author>
<name>Eli Cooper</name>
<email>elicooper@gmx.com</email>
</author>
<published>2016-03-19T16:58:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a78ff1112263fdd871d3506dbcff44f6f12e8423'/>
<id>urn:sha1:a78ff1112263fdd871d3506dbcff44f6f12e8423</id>
<content type='text'>
This patch extends save_fp_registers() and restore_fp_registers() to use
PTRACE_GETREGSET and PTRACE_SETREGSET with the XSTATE note type, adding
support for new processor state extensions between context switches.

When the new ptrace requests are unavailable, it falls back to the old
PTRACE_GETFPREGS and PTRACE_SETFPREGS methods, which have been renamed to
save_i387_registers() and restore_i387_registers().

Now these functions expect *fp_regs to have the space of an _xstate struct.
Thus, this also makes ptrace in UML responde to PTRACE_GETFPREGS/_SETFPREG
requests with a user_i387_struct (thus independent from HOST_FP_SIZE), and
by calling save_i387_registers() and restore_i387_registers() instead of
the extended save_fp_registers() and restore_fp_registers() functions.

Signed-off-by: Eli Cooper &lt;elicooper@gmx.com&gt;
</content>
</entry>
<entry>
<title>um: get rid of pointless include "..." where include &lt;...&gt; will do</title>
<updated>2012-10-09T20:28:45Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2012-10-08T02:27:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37185b33240870719b6b5913a46e6a441f1ae96f'/>
<id>urn:sha1:37185b33240870719b6b5913a46e6a441f1ae96f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: Save FPU registers between task switches</title>
<updated>2011-09-15T01:09:37Z</updated>
<author>
<name>Ingo van Lil</name>
<email>inguin@gmx.de</email>
</author>
<published>2011-09-14T23:21:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fbfe9c847edf57ac8232aeafb290f272289893a3'/>
<id>urn:sha1:fbfe9c847edf57ac8232aeafb290f272289893a3</id>
<content type='text'>
Some time ago Jeff prepared 42daba316557 ("uml: stop saving process FP
state") for UML to stop saving the process FP state between task
switches.  The assumption was that since with SKAS0 every guest process
runs inside a host process context the host OS will take care of keeping
the proper FP state.

Unfortunately this is not true for multi-threaded applications, where
all guest threads share a single host process context yet all may use
the FPU on their own.  Although I haven't verified it I suspect things
to be even worse in SKAS3 mode where all guest processes run inside a
single host process.

The patch reintroduces the saving and restoring of the FP context
between task switches.

[richard@nod.at: Ingo posted this patch in 2009, sadly it was never applied
and got lost. Now in 2011 the problem was reported by Gunnar.]

Signed-off-by: Ingo van Lil &lt;inguin@gmx.de&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Reported-by: &lt;gunnarlindroth@hotmail.com&gt;
Tested-by: &lt;gunnarlindroth@hotmail.com&gt;
Cc: Stanislav Meduna &lt;stano@meduna.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86, um: take arch/um/include/* out of the way</title>
<updated>2008-10-23T05:55:19Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-08-17T17:48:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8569c9140bd41089f9b6be8837ca421102714a90'/>
<id>urn:sha1:8569c9140bd41089f9b6be8837ca421102714a90</id>
<content type='text'>
We can't just plop asm/* into it - userland helpers are built with it
in search path and seeing asm/* show up there suddenly would be a bad
idea.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
</feed>
