<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/um/kernel/trap.c, branch v3.0.82</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/um/kernel/trap.c?h=v3.0.82</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/um/kernel/trap.c?h=v3.0.82'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-05-25T15:39:41Z</updated>
<entry>
<title>um: print info about fatal segfaults</title>
<updated>2011-05-25T15:39:41Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2011-05-25T00:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ef6130ab25a9db6627212d2f6859cc7fc0427ed'/>
<id>urn:sha1:3ef6130ab25a9db6627212d2f6859cc7fc0427ed</id>
<content type='text'>
Print a short info about fatal segfaults like other archs do.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&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>Move FAULT_FLAG_xyz into handle_mm_fault() callers</title>
<updated>2009-06-21T20:08:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-10T16:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d06063cc221fdefcab86589e79ddfdb7c0e14b63'/>
<id>urn:sha1:d06063cc221fdefcab86589e79ddfdb7c0e14b63</id>
<content type='text'>
This allows the callers to now pass down the full set of FAULT_FLAG_xyz
flags to handle_mm_fault().  All callers have been (mechanically)
converted to the new calling convention, there's almost certainly room
for architectures to clean up their code and then add FAULT_FLAG_RETRY
when that support is added.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: invoke oom-killer from page fault</title>
<updated>2009-01-06T23:58:58Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2009-01-06T22:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c0fe6e3bda0464728c23c8d84aa47567e8b716c'/>
<id>urn:sha1:1c0fe6e3bda0464728c23c8d84aa47567e8b716c</id>
<content type='text'>
Rather than have the pagefault handler kill a process directly if it gets
a VM_FAULT_OOM, have it call into the OOM killer.

With increasingly sophisticated oom behaviour (cpusets, memory cgroups,
oom killing throttling, oom priority adjustment or selective disabling,
panic on oom, etc), it's silly to unconditionally kill the faulting
process at page fault time.  Create a hook for pagefault oom path to call
into instead.

Only converted x86 and uml so far.

[akpm@linux-foundation.org: make __out_of_memory() static]
[akpm@linux-foundation.org: fix comment]
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&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: kill processes instead of panicing kernel</title>
<updated>2008-02-05T17:44:28Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-05T06:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e6f2ac480ce398ade2fd6b5e02d00d1265f1e0f'/>
<id>urn:sha1:3e6f2ac480ce398ade2fd6b5e02d00d1265f1e0f</id>
<content type='text'>
UML was panicing in the case of failures of libc calls which shouldn't happen.
 This is an overreaction since a failure from libc doesn't normally mean that
kernel data structures are in an unknown state.  Instead, the current process
should just be killed if there is no way to recover.

The case that prompted this was a failure of PTRACE_SETREGS restoring the same
state that was read by PTRACE_GETREGS.  It appears that when a process tries
to load a bogus value into a segment register, it segfaults (as expected) and
the value is actually loaded and is seen by PTRACE_GETREGS (not expected).

This case is fixed by forcing a fatal SIGSEGV on the process so that it
immediately dies.  fatal_sigsegv was added for this purpose.  It was declared
as noreturn, so in order to pursuade gcc that it actually does not return, I
added a call to os_dump_core (and declared it noreturn) so that I get a core
file if somehow the process survives.

All other calls in arch/um/os-Linux/skas/process.c got the same treatment,
with failures causing the process to die instead of a kernel panic, with some
exceptions.

userspace_tramp exits with status 1 if anything goes wrong there.  That will
cause start_userspace to return an error.  copy_context_skas0 and
map_stub_pages also now return errors instead of panicing.  Callers of thes
functions were changed to check for errors and do something appropriate.
Usually that's to return an error to their callers.
check_skas3_ptrace_faultinfo just exits since that's too early to do anything
else.

save_registers, restore_registers, and init_registers now return status
instead of panicing on failure, with their callers doing something
appropriate.

There were also duplicate declarations of save_registers and restore_registers
in os.h - these are gone.

I noticed and fixed up some whitespace damage.

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: tidy pgtable.h</title>
<updated>2008-02-05T17:44:26Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-05T06:30:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d83ecf083a2163705f5ebcede4637a955eb7b964'/>
<id>urn:sha1:d83ecf083a2163705f5ebcede4637a955eb7b964</id>
<content type='text'>
Large pieces of include/asm/pgtable.h were unused cruft.

This uncovered arch/um/kernel/trap.c needing skas.h in order to get
ptrace_faultinfo.

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: tidy kern_util.h</title>
<updated>2008-02-05T17:44:26Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-05T06:30:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=edea138584d7586a3b93b6d5ab5ec021d18e11e9'/>
<id>urn:sha1:edea138584d7586a3b93b6d5ab5ec021d18e11e9</id>
<content type='text'>
Tidy kern_util.h.  It turns out that most of the function declarations
aren't used, so they can go away.  os.h no longer includes
kern_util.h, so files which got it through os.h now need to include it
directly.  A number of other files never needed it, so these includes
are deleted.

The structure which was used to pass signal handlers from the kernel
side to the userspace side is gone.  Instead, the handlers are
declared here, and used directly from libc code.  This allows
arch/um/os-Linux/trap.c to be deleted, with its remnants being moved
to arch/um/os-Linux/skas/trap.c.

arch/um/os-Linux/tty.c had its inclusions changed, and it needed some
style attention, so it got tidied.

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: further bugs.c tidying</title>
<updated>2008-02-05T17:44:25Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2008-02-05T06:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9226b8384776798986640ce07764d17ba66aa54f'/>
<id>urn:sha1:9226b8384776798986640ce07764d17ba66aa54f</id>
<content type='text'>
bugs.c, for both i386 and x86_64, can undergo further cleaning -
	The i386 arch_check_bugs only does one thing, so we might as
well inline the cmov checking.
	The i386 includes can be trimmed down a bit.
	arch_init_thread wasn't used, so it is deleted.
	The panics in arch_handle_signal are turned into printks
because the process is about to get segfaulted anyway, so something is
dying no matter what happens here.  Also, the return value was always
the same, so it contained no information, so it can be void instead.
The name is changed to arch_examine_signal because it doesn't handle
anything.
	The caller of arch_handle_signal, relay_signal, does things in
a different order.  The kernel-mode signal check is now first, which
puts everything else together, making things a bit clearer conceptually.

[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>pid namespaces: define is_global_init() and is_container_init()</title>
<updated>2007-10-19T18:53:37Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2007-10-19T06:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b460cbc581a53cc088ceba80608021dd49c63c43'/>
<id>urn:sha1:b460cbc581a53cc088ceba80608021dd49c63c43</id>
<content type='text'>
is_init() is an ambiguous name for the pid==1 check.  Split it into
is_global_init() and is_container_init().

A cgroup init has it's tsk-&gt;pid == 1.

A global init also has it's tsk-&gt;pid == 1 and it's active pid namespace
is the init_pid_ns.  But rather than check the active pid namespace,
compare the task structure with 'init_pid_ns.child_reaper', which is
initialized during boot to the /sbin/init process and never changes.

Changelog:

	2.6.22-rc4-mm2-pidns1:
	- Use 'init_pid_ns.child_reaper' to determine if a given task is the
	  global init (/sbin/init) process. This would improve performance
	  and remove dependence on the task_pid().

	2.6.21-mm2-pidns2:

	- [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
	  ppc,avr32}/traps.c for the _exception() call to is_global_init().
	  This way, we kill only the cgroup if the cgroup's init has a
	  bug rather than force a kernel panic.

[akpm@linux-foundation.org: fix comment]
[sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
[bunk@stusta.de: kernel/pid.c: remove unused exports]
[sukadev@us.ibm.com: Fix capability.c to work with threaded init]
Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Sukadev Bhattiprolu &lt;sukadev@us.ibm.com&gt;
Acked-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Cc: Herbert Poetzel &lt;herbert@13thfloor.at&gt;
Cc: Kirill Korotaev &lt;dev@sw.ru&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: get rid of do_longjmp</title>
<updated>2007-10-16T16:43:05Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fab95c55e3b94e219044dc7a558632d08c198771'/>
<id>urn:sha1:fab95c55e3b94e219044dc7a558632d08c198771</id>
<content type='text'>
do_longjmp used to be needed when UML didn't have its own implementation of
setjmp and longjmp.  They came from libc, and couldn't be called directly from
kernel code, as the libc jmp_buf couldn't be imported there.  do_longjmp was a
userspace function which served to provide longjmp access to kernel code.

This is gone, and a number of void * pointers can now be jmp_buf *.

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 code made redundant by CHOOSE_MODE removal</title>
<updated>2007-10-16T16:43:05Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77bf4400319db9d2a8af6b00c2be6faa0f3d07cb'/>
<id>urn:sha1:77bf4400319db9d2a8af6b00c2be6faa0f3d07cb</id>
<content type='text'>
This patch makes a number of simplifications enabled by the removal of
CHOOSE_MODE.  There were lots of functions that looked like

	int foo(args){
		foo_skas(args);
	}

The bodies of foo_skas are now folded into foo, and their declarations (and
sometimes entire header files) are deleted.

In addition, the union uml_pt_regs, which was a union between the tt and skas
register formats, is now a struct, with the tt-mode arm of the union being
removed.

It turns out that usr2_handler was unused, so it is gone.

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>
