<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/arch/um/include/sysdep-i386, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/arch/um/include/sysdep-i386?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/arch/um/include/sysdep-i386?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2008-10-23T05:55:19Z</updated>
<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://git.zx2c4.com/linux-dev/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>
<entry>
<title>uml: tidy ptrace interface</title>
<updated>2008-05-13T15:02:21Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-05-12T21:01:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=47906dd9e63ba1a8cb188e9e786c5928674fbbd3'/>
<id>urn:sha1:47906dd9e63ba1a8cb188e9e786c5928674fbbd3</id>
<content type='text'>
Tidy the ptrace interface code.  Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&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>uml: style fixes</title>
<updated>2008-05-13T15:02:21Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-05-12T21:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=96cee3044dca2e6510ca7cc276d1eac34a1cfd51'/>
<id>urn:sha1:96cee3044dca2e6510ca7cc276d1eac34a1cfd51</id>
<content type='text'>
A few random style fixes.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&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>uml: fix FP register corruption</title>
<updated>2008-02-24T01:12:15Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-23T23:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f56debd77a8f52f1ac1d3c3d89cc7ce5e083230'/>
<id>urn:sha1:2f56debd77a8f52f1ac1d3c3d89cc7ce5e083230</id>
<content type='text'>
Commit ee3d9bd4de1ed93d2a7ee41c331ed30a1c7b8acd ("uml: simplify SIGSEGV
handling"), while greatly simplifying the kernel SIGSEGV handler that
runs in the process address space, introduced a bug which corrupts FP
state in the process.

Previously, the SIGSEGV handler called the sigreturn system call by hand - it
couldn't return through the restorer provided to it because that could try to
call the libc restorer which likely wouldn't exist in the process address
space.  So, it blocked off some signals, including SIGUSR1, on entry to the
SIGSEGV handler, queued a SIGUSR1 to itself, and invoked sigreturn.  The
SIGUSR1 was delivered, and was visible to the UML kernel after sigreturn
finished.

The commit eliminated the signal masking and the call to sigreturn.  The
handler simply hits itself with a SIGTRAP to let the UML kernel know that it
is finished.  UML then restores the process registers, which effectively
longjmps the process out of the signal handler, skipping sigreturn's restoring
of register state and the signal mask.

The bug is that the host apparently sets used_fp to 0 when it saves the
process FP state in the sigcontext on the process signal stack.  Thus, when
the process is longjmped out of the handler, its FP state is corrupt because
it wasn't saved on the context switch to the UML kernel.

This manifested itself as sleep hanging.  For some reason, sleep uses floating
point in order to calculate the sleep interval.  When a page fault corrupts
its FP state, it is faked into essentially sleeping forever.

This patch saves the FP state before entering the SIGSEGV handler and restores
it afterwards.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>uml: redo the calculation of NR_syscalls</title>
<updated>2008-02-05T17:44:32Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-05T06:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f87ea91d988637b3bbf6aa2d281c6010e7d5f48d'/>
<id>urn:sha1:f87ea91d988637b3bbf6aa2d281c6010e7d5f48d</id>
<content type='text'>
Redo the calculation of NR_syscalls since that disappeared from i386 and
use a similar mechanism on x86_64.

We now figure out the size of the system call table in arch code and stick
that in syscall_table_size.  arch/um/kernel/skas/syscall.c defines
NR_syscalls in terms of that since its the only thing that needs to know
how many system calls there are.

The old mechananism that was used on x86_64 is gone.

arch/um/include/sysdep-i386/syscalls.h got some formatting since I was
looking at it.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&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>uml: fix stub address calculations</title>
<updated>2007-10-16T16:43:09Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=54ae36f24b103e521dd683f66fe72b0584ccb7e2'/>
<id>urn:sha1:54ae36f24b103e521dd683f66fe72b0584ccb7e2</id>
<content type='text'>
The calculation of CONFIG_STUB_CODE and CONFIG_STUB_DATA didn't take into
account anything but 3G/1G and 2G/2G, leaving the other vmsplits out in the
cold.

I'd rather not duplicate the four known host vmsplit cases for each of these
symbols.  I'd also like to calculate them based on the highest userspace
address.

The Kconfig language seems not to allow calculation of hex constants, so I
moved this to as-layout.h.  CONFIG_STUB_CODE, CONFIG_STUB_DATA, and
CONFIG_STUB_START are now gone.  In their place are STUB_CODE, STUB_DATA, and
STUB_START in as-layout.h.

i386 and x86_64 seem to differ as to whether an unadorned constant is an int
or a long, so I cast them to unsigned long so they can be printed
consistently.  However, they are also used in stub.S, where C types don't work
so well.  So, there are ASM_ versions of these constants for use in stub.S.  I
also ifdef-ed the non-asm-friendly portion of as-layout.h.

With this in place, most of the rest of this patch is changing CONFIG_STUB_*
to STUB_*, except in stub.S, where they are changed to ASM_STUB_*.

defconfig has the old symbols deleted.

I also print these addresses out in case there is any problem mapping them on
the host.

The two stub.S files had some trailing whitespace, so that is cleaned up here.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>uml: eliminate floating point state from register file</title>
<updated>2007-10-16T16:43:07Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=75c7e214ba7af2ced1ba8a73d673294e30826410'/>
<id>urn:sha1:75c7e214ba7af2ced1ba8a73d673294e30826410</id>
<content type='text'>
The floating point fields in the pt_regs register file aren't used, so they
are deleted.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>uml: style fixes in FP code</title>
<updated>2007-10-16T16:43:07Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f0c4cad99c12f08cb2a6cd0255911b2a93c57707'/>
<id>urn:sha1:f0c4cad99c12f08cb2a6cd0255911b2a93c57707</id>
<content type='text'>
Tidy the code affected by the floating point fixes.

A bunch of unused stuff is gone, including two sigcontext.c files,
which turned out to be entirely unneeded.

There are the usual fixes -
	whitespace and style cleanups
	copyright updates
	emacs formatting comments gone
	include cleanups
	adding severities to printks

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>uml: floating point signal delivery fixes</title>
<updated>2007-10-16T16:43:07Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a5f6096c805e6d2fa03ee932f8c70af34cee41a0'/>
<id>urn:sha1:a5f6096c805e6d2fa03ee932f8c70af34cee41a0</id>
<content type='text'>
Handle floating point state in across signals correctly.  UML/i386 needs to
know whether the host does PTRACE_[GS]ETFPXREGS, so an arch_init_registers
hook is added, which on x86_64 does nothing.

UML doesn't save and restore floating point registers on kernel entry and
exit, so they need to be copied between the host process and the sigcontext.
save_fpx_registers and restore_fpx_registers are added for this purpose.
save_fp_registers and restore_fp_registers already exist.

There was a bunch of floating point state conversion code in
arch/um/sys-i386/ptrace.c which isn't needed there, but is needed in signal.c,
so it is moved over.

The i386 code now distinguishes between fp and fpx state and handles them
correctly.  The x86_64 code just needs to copy state as-is between the host
process and the stack.  There are also some fixes there to pass the correct
address of the floating point state around.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>uml: remove os_* usage from userspace files</title>
<updated>2007-10-16T16:43:06Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8ca842c4b5cbc70b9180617e9f26b6ac9f40dbb9'/>
<id>urn:sha1:8ca842c4b5cbc70b9180617e9f26b6ac9f40dbb9</id>
<content type='text'>
This patch fixes some userspace files which were calling libc through the os_*
wrappers.

It turns out that there was only one user of os_new_tty_pgrp, so it can be
deleted.

There are also some style and whitespace fixes in here.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&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>
</feed>
