<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/exec.c, branch v2.6.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/exec.c?h=v2.6.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/exec.c?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2006-10-02T14:57:21Z</updated>
<entry>
<title>[PATCH] namespaces: utsname: switch to using uts namespaces</title>
<updated>2006-10-02T14:57:21Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e9ff3990f08e9a0c2839cc22808b01732ea5b3e4'/>
<id>urn:sha1:e9ff3990f08e9a0c2839cc22808b01732ea5b3e4</id>
<content type='text'>
Replace references to system_utsname to the per-process uts namespace
where appropriate.  This includes things like uname.

Changes: Per Eric Biederman's comments, use the per-process uts namespace
	for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c

[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Support piping into commands in /proc/sys/kernel/core_pattern</title>
<updated>2006-10-01T07:39:33Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2006-10-01T06:29:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d025c9db7f31fc0554ce7fb2dfc78d35a77f3487'/>
<id>urn:sha1:d025c9db7f31fc0554ce7fb2dfc78d35a77f3487</id>
<content type='text'>
Using the infrastructure created in previous patches implement support to
pipe core dumps into programs.

This is done by overloading the existing core_pattern sysctl
with a new syntax:

|program

When the first character of the pattern is a '|' the kernel will instead
threat the rest of the pattern as a command to run.  The core dump will be
written to the standard input of that program instead of to a file.

This is useful for having automatic core dump analysis without filling up
disks.  The program can do some simple analysis and save only a summary of
the core dump.

The core dump proces will run with the privileges and in the name space of
the process that caused the core dump.

I also increased the core pattern size to 128 bytes so that longer command
lines fit.

Most of the changes comes from allowing core dumps without seeks.  They are
fairly straight forward though.

One small incompatibility is that if someone had a core pattern previously
that started with '|' they will get suddenly new behaviour.  I think that's
unlikely to be a real problem though.

Additional background:

&gt; Very nice, do you happen to have a program that can accept this kind of
&gt; input for crash dumps?  I'm guessing that the embedded people will
&gt; really want this functionality.

I had a cheesy demo/prototype.  Basically it wrote the dump to a file again,
ran gdb on it to get a backtrace and wrote the summary to a shared directory.
Then there was a simple CGI script to generate a "top 10" crashes HTML
listing.

Unfortunately this still had the disadvantage to needing full disk space for a
dump except for deleting it afterwards (in fact it was worse because over the
pipe holes didn't work so if you have a holey address map it would require
more space).

Fortunately gdb seems to be happy to handle /proc/pid/fd/xxx input pipes as
cores (at least it worked with zsh's =(cat core) syntax), so it would be
likely possible to do it without temporary space with a simple wrapper that
calls it in the right way.  I ran out of time before doing that though.

The demo prototype scripts weren't very good.  If there is really interest I
can dig them out (they are currently on a laptop disk on the desk with the
laptop itself being in service), but I would recommend to rewrite them for any
serious application of this and fix the disk space problem.

Also to be really useful it should probably find a way to automatically fetch
the debuginfos (I cheated and just installed them in advance).  If nobody else
does it I can probably do the rewrite myself again at some point.

My hope at some point was that desktops would support it in their builtin
crash reporters, but at least the KDE people I talked too seemed to be happy
with their user space only solution.

Alan sayeth:

  I don't believe that piping as such as neccessarily the right model, but
  the ability to intercept and processes core dumps from user space is asked
  for by many enterprise users as well.  They want to know about, capture,
  analyse and process core dumps, often centrally and in automated form.

[akpm@osdl.org: loff_t != unsigned long]
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] csa: convert CONFIG tag for extended accounting routines</title>
<updated>2006-10-01T07:39:29Z</updated>
<author>
<name>Jay Lan</name>
<email>jlan@engr.sgi.com</email>
</author>
<published>2006-10-01T06:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f0ab5147951267134612570604cf8341901a80c'/>
<id>urn:sha1:8f0ab5147951267134612570604cf8341901a80c</id>
<content type='text'>
There were a few accounting data/macros that are used in CSA but are #ifdef'ed
inside CONFIG_BSD_PROCESS_ACCT.  This patch is to change those ifdef's from
CONFIG_BSD_PROCESS_ACCT to CONFIG_TASK_XACCT.  A few defines are moved from
kernel/acct.c and include/linux/acct.h to kernel/tsacct.c and
include/linux/tsacct_kern.h.

Signed-off-by: Jay Lan &lt;jlan@sgi.com&gt;
Cc: Shailabh Nagar &lt;nagar@watson.ibm.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Jes Sorensen &lt;jes@sgi.com&gt;
Cc: Chris Sturtivant &lt;csturtiv@sgi.com&gt;
Cc: Tony Ernst &lt;tee@sgi.com&gt;
Cc: Guillaume Thouvenin &lt;guillaume.thouvenin@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix unserialized task-&gt;files changing</title>
<updated>2006-09-29T16:18:12Z</updated>
<author>
<name>Kirill Korotaev</name>
<email>dev@sw.ru</email>
</author>
<published>2006-09-29T09:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b9b8ab65d8eed784b9164d03807cb2bda7b5cd6'/>
<id>urn:sha1:3b9b8ab65d8eed784b9164d03807cb2bda7b5cd6</id>
<content type='text'>
Fixed race on put_files_struct on exec with proc.  Restoring files on
current on error path may lead to proc having a pointer to already kfree-d
files_struct.

-&gt;files changing at exit.c and khtread.c are safe as exit_files() makes all
things under lock.

Found during OpenVZ stress testing.

[akpm@osdl.org: add export]
Signed-off-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Kirill Korotaev &lt;dev@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] de_thread: Use tsk not current</title>
<updated>2006-09-27T15:26:20Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2006-09-27T08:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aafe6c2a2b6bce5a3a4913ce5c07e85ea143144d'/>
<id>urn:sha1:aafe6c2a2b6bce5a3a4913ce5c07e85ea143144d</id>
<content type='text'>
Ingo Oeser pointed out that because current expands to an inline function
it is more space efficient and somewhat faster to simply keep a cached copy
of current in another variable.  This patch implements that for the
de_thread function.

(akpm: saves nearly 100 bytes of text on x86)

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] pid: Implement transfer_pid and use it to simplify de_thread</title>
<updated>2006-09-27T15:26:19Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2006-09-27T08:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c18258c6f0848f97e85287f6271c511a092bb784'/>
<id>urn:sha1:c18258c6f0848f97e85287f6271c511a092bb784</id>
<content type='text'>
In de_thread we move pids from one process to another, a rather ugly case.
The function transfer_pid makes it clear what we are doing, and makes the
action atomic.  This is useful we ever want to atomically traverse the
process group and session lists, in a rcu safe manner.

Even if the atomic properties this change should be a win as transfer_pid
should be less code to execute than executing both attach_pid and
detach_pid, and this should make de_thread slightly smaller as only a
single function call needs to be emitted.  The only downside is that the
code might be slower to execute as the odds are against transfer_pid being
in cache.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fix up lockdep trace in fs/exec.c</title>
<updated>2006-08-27T18:01:32Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2006-08-27T08:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=513627d7fec6fcb7b3d56ce355cb4d192c76b530'/>
<id>urn:sha1:513627d7fec6fcb7b3d56ce355cb4d192c76b530</id>
<content type='text'>
This fixes the locking error noticed by lockdep:

  =============================================
  [ INFO: possible recursive locking detected ]
  ---------------------------------------------
  init/1 is trying to acquire lock:
   (&amp;sighand-&gt;siglock){....}, at: [&lt;c047a78a&gt;] flush_old_exec+0x3ae/0x859

  but task is already holding lock:
   (&amp;sighand-&gt;siglock){....}, at: [&lt;c047a77a&gt;] flush_old_exec+0x39e/0x859

  other info that might help us debug this:
  2 locks held by init/1:
   #0:  (tasklist_lock){..--}, at: [&lt;c047a76a&gt;] flush_old_exec+0x38e/0x859
   #1:  (&amp;sighand-&gt;siglock){....}, at: [&lt;c047a77a&gt;] flush_old_exec+0x39e/0x859

  stack backtrace:
   [&lt;c04051e1&gt;] show_trace_log_lvl+0x54/0xfd
   [&lt;c040579d&gt;] show_trace+0xd/0x10
   [&lt;c04058b6&gt;] dump_stack+0x19/0x1b
   [&lt;c043b33a&gt;] __lock_acquire+0x773/0x997
   [&lt;c043bacf&gt;] lock_acquire+0x4b/0x6c
   [&lt;c060630b&gt;] _spin_lock+0x19/0x28
   [&lt;c047a78a&gt;] flush_old_exec+0x3ae/0x859
   [&lt;c0498053&gt;] load_elf_binary+0x4aa/0x1628
   [&lt;c0479cab&gt;] search_binary_handler+0xa7/0x24e
   [&lt;c047b577&gt;] do_execve+0x15b/0x1f9
   [&lt;c04022b4&gt;] sys_execve+0x29/0x4d
   [&lt;c0403faf&gt;] syscall_call+0x7/0xb

Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>VFS: Remove redundant open-coded mode bit checks in open_exec().</title>
<updated>2006-08-24T19:55:16Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2006-08-23T00:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a969fd5a4e162c4485ae8f3e49d674656a18fa36'/>
<id>urn:sha1:a969fd5a4e162c4485ae8f3e49d674656a18fa36</id>
<content type='text'>
The check in open_exec() for inode-&gt;i_mode &amp; 0111 has been made
redundant by the fix to permission().

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
(cherry picked from 1d3741c5d991686699f100b65b9956f7ee7ae0ae commit)
</content>
</entry>
<entry>
<title>VFS: Remove redundant open-coded mode bit check in prepare_binfmt().</title>
<updated>2006-08-24T19:55:06Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2006-08-23T00:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9167b0b9a0ab7907191523f5a0528e3b9c288e21'/>
<id>urn:sha1:9167b0b9a0ab7907191523f5a0528e3b9c288e21</id>
<content type='text'>
The check in prepare_binfmt() for inode-&gt;i_mode &amp; 0111 is redundant,
since open_exec() will already have done that.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
(cherry picked from 822dec482ced07af32c378cd936d77345786572b commit)
</content>
</entry>
<entry>
<title>Remove obsolete #include &lt;linux/config.h&gt;</title>
<updated>2006-06-30T17:25:36Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@wohnheim.fh-wedel.de</email>
</author>
<published>2006-06-30T17:25:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ab3d5624e172c553004ecc862bfeac16d9d68b7'/>
<id>urn:sha1:6ab3d5624e172c553004ecc862bfeac16d9d68b7</id>
<content type='text'>
Signed-off-by: Jörn Engel &lt;joern@wohnheim.fh-wedel.de&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
</content>
</entry>
</feed>
