<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/relay.c, branch v2.6.25-rc2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>relay: nopage</title>
<updated>2008-02-06T18:41:07+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-02-06T09:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1e096129bff79ae551592539bef19bfb5c9efa1'/>
<id>a1e096129bff79ae551592539bef19bfb5c9efa1</id>
<content type='text'>
Convert relay from nopage to fault.
Remove redundant vma range checks.
Switch from OOM to SIGBUS if the resource is not available.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert relay from nopage to fault.
Remove redundant vma range checks.
Switch from OOM to SIGBUS if the resource is not available.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vm audit: add VM_DONTEXPAND to mmap for drivers that need it</title>
<updated>2008-02-04T15:55:38+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-02-02T02:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f98735c9c24ea1f0d40a364d4e63611b689b795'/>
<id>2f98735c9c24ea1f0d40a364d4e63611b689b795</id>
<content type='text'>
Drivers that register a -&gt;fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.

I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drivers that register a -&gt;fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.

I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>whitespace fixes: relayfs</title>
<updated>2007-10-18T21:37:24+00:00</updated>
<author>
<name>Daniel Walker</name>
<email>dwalker@mvista.com</email>
</author>
<published>2007-10-18T10:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1bfbc608ba05951678eedc246c9baf62367764a0'/>
<id>1bfbc608ba05951678eedc246c9baf62367764a0</id>
<content type='text'>
Signed-off-by: Daniel Walker &lt;dwalker@mvista.com&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Daniel Walker &lt;dwalker@mvista.com&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a use after free bug in kernel-&gt;userspace relay file support</title>
<updated>2007-07-31T22:39:42+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>jesper.juhl@gmail.com</email>
</author>
<published>2007-07-31T07:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c9b3febc5b9c55a76b838c977b078195ec8bb95e'/>
<id>c9b3febc5b9c55a76b838c977b078195ec8bb95e</id>
<content type='text'>
Coverity spotted what looks like a real possible case of using a variable
after it has been freed.  The problem is in
kernel/relay.c::relay_open_buf()

If the code hits "goto free_buf;" it ends up in this code :

  free_buf:
    	relay_destroy_buf(buf);	&lt;--- calls kfree() on 'buf'.
  free_name:
   	kfree(tmpname);
  end:
  	return buf;		&lt;-- use after free of 'buf'.

I read through the callers and they all handle a NULL return from this
function as an error (and hitting the 'free_buf' label only happens on
failure to chan-&gt;cb-&gt;create_buf_file(), so that looks like a clear error to
me).

The patch simply sets 'buf' to NULL after the call to
relay_destroy_buf(buf); - as far as I can see that should take care of the
problem.

The patch also corrects a reference to a documentation file while
I was at it.

Note from Mathieu: the documentation reference change should have been
done in a separate patch, but I guess no one will really care.

Signed-off-by: Jesper Juhl &lt;jesper.juhl@gmail.com&gt;
Acked-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Tested-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Cc: Karim Yaghmour &lt;karim@opersys.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity spotted what looks like a real possible case of using a variable
after it has been freed.  The problem is in
kernel/relay.c::relay_open_buf()

If the code hits "goto free_buf;" it ends up in this code :

  free_buf:
    	relay_destroy_buf(buf);	&lt;--- calls kfree() on 'buf'.
  free_name:
   	kfree(tmpname);
  end:
  	return buf;		&lt;-- use after free of 'buf'.

I read through the callers and they all handle a NULL return from this
function as an error (and hitting the 'free_buf' label only happens on
failure to chan-&gt;cb-&gt;create_buf_file(), so that looks like a clear error to
me).

The patch simply sets 'buf' to NULL after the call to
relay_destroy_buf(buf); - as far as I can see that should take care of the
problem.

The patch also corrects a reference to a documentation file while
I was at it.

Note from Mathieu: the documentation reference change should have been
done in a separate patch, but I guess no one will really care.

Signed-off-by: Jesper Juhl &lt;jesper.juhl@gmail.com&gt;
Acked-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Tested-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Cc: Karim Yaghmour &lt;karim@opersys.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/relay.c: make functions static</title>
<updated>2007-07-19T17:04:47+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2007-07-19T08:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01c55ed3260e130f152b7fbab2e18f23980b59a4'/>
<id>01c55ed3260e130f152b7fbab2e18f23980b59a4</id>
<content type='text'>
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>relay: fixup kerneldoc comment</title>
<updated>2007-07-13T12:14:28+00:00</updated>
<author>
<name>Tom Zanussi</name>
<email>zanussi@us.ibm.com</email>
</author>
<published>2007-07-12T06:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3f35d98b3b87d2506289320375687c6e9bc53ed'/>
<id>d3f35d98b3b87d2506289320375687c6e9bc53ed</id>
<content type='text'>
Change comment from kerneldoc to normal.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change comment from kerneldoc to normal.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>relay: fix bogus cast in subbuf_splice_actor()</title>
<updated>2007-07-13T12:14:26+00:00</updated>
<author>
<name>Tom Zanussi</name>
<email>zanussi@us.ibm.com</email>
</author>
<published>2007-07-12T06:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=24da24de2eae0c277b85836e2b4b09cfafeea995'/>
<id>24da24de2eae0c277b85836e2b4b09cfafeea995</id>
<content type='text'>
The current code that sets the read position in subbuf_splice_actor may
give erroneous results if the buffer size isn't a power of 2.  This
patch fixes the problem.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code that sets the read position in subbuf_splice_actor may
give erroneous results if the buffer size isn't a power of 2.  This
patch fixes the problem.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pipe: change the -&gt;pin() operation to -&gt;confirm()</title>
<updated>2007-07-10T06:04:15+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2007-06-14T11:10:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cac36bb06efe4880234524e117e0e712b10b1f16'/>
<id>cac36bb06efe4880234524e117e0e712b10b1f16</id>
<content type='text'>
The name 'pin' was badly chosen, it doesn't pin a pipe buffer
in the most commonly used sense in the kernel. So change the
name to 'confirm', after debating this issue with Hugh
Dickins a bit.

A good return from -&gt;confirm() means that the buffer is really
there, and that the contents are good.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The name 'pin' was badly chosen, it doesn't pin a pipe buffer
in the most commonly used sense in the kernel. So change the
name to 'confirm', after debating this issue with Hugh
Dickins a bit.

A good return from -&gt;confirm() means that the buffer is really
there, and that the contents are good.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>relay: use splice_to_pipe() instead of open-coding the pipe loop</title>
<updated>2007-07-10T06:04:15+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2007-06-12T06:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1db60cf2056511c7c8cebcbaee308ef6c79b4728'/>
<id>1db60cf2056511c7c8cebcbaee308ef6c79b4728</id>
<content type='text'>
It cleans up the relay splice implementation a lot, and gets rid of
a lot of internal pipe knowledge that should not be in there.

Plus fixes for padding and partial first page (and lots more) from
Tom Zanussi.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It cleans up the relay splice implementation a lot, and gets rid of
a lot of internal pipe knowledge that should not be in there.

Plus fixes for padding and partial first page (and lots more) from
Tom Zanussi.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>splice: divorce the splice structure/function definitions from the pipe header</title>
<updated>2007-07-10T06:04:14+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2007-06-04T07:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d6b29d7cee064f28ca097e906de7453541351095'/>
<id>d6b29d7cee064f28ca097e906de7453541351095</id>
<content type='text'>
We need to move even more stuff into the header so that folks can use
the splice_to_pipe() implementation instead of open-coding a lot of
pipe knowledge (see relay implementation), so move to our own header
file finally.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to move even more stuff into the header so that folks can use
the splice_to_pipe() implementation instead of open-coding a lot of
pipe knowledge (see relay implementation), so move to our own header
file finally.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
