<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/xen/gntdev.c, branch v2.6.39</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>xen-gntdev: unlock on error path in gntdev_mmap()</title>
<updated>2011-03-24T14:32:45+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-03-19T05:45:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a93e20a83077f57638f8574b1c072ce6712e95ec'/>
<id>a93e20a83077f57638f8574b1c072ce6712e95ec</id>
<content type='text'>
We should unlock here and also decrement the number of &amp;map-&gt;users.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should unlock here and also decrement the number of &amp;map-&gt;users.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: return -EFAULT on copy_to_user failure</title>
<updated>2011-03-24T14:32:44+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-03-19T05:44:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=12f0258d5b44b3b5a9442ec461bbac1f7edab8c6'/>
<id>12f0258d5b44b3b5a9442ec461bbac1f7edab8c6</id>
<content type='text'>
copy_to_user() returns the amount of data remaining to be copied.  We
want to return a negative error code here.  The upper layers just
call WARN_ON() if we return non-zero so this doesn't change the
behavior.  But returning -EFAULT is still cleaner.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
copy_to_user() returns the amount of data remaining to be copied.  We
want to return a negative error code here.  The upper layers just
call WARN_ON() if we return non-zero so this doesn't change the
behavior.  But returning -EFAULT is still cleaner.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Use ballooned pages for grant mappings</title>
<updated>2011-03-16T14:05:36+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-03-09T23:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ca47ceaa2c407bbddd395c1807b616042365bd65'/>
<id>ca47ceaa2c407bbddd395c1807b616042365bd65</id>
<content type='text'>
Grant mappings cause the PFN&lt;-&gt;MFN mapping to be lost on the pages used
for the mapping. Instead of leaking memory, use pages that have already
been ballooned out and so have no valid mapping. This removes the need
for the bad-page leak workaround as pages are repopulated by the balloon
driver.

Acked-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Grant mappings cause the PFN&lt;-&gt;MFN mapping to be lost on the pages used
for the mapping. Instead of leaking memory, use pages that have already
been ballooned out and so have no valid mapping. This removes the need
for the bad-page leak workaround as pages are repopulated by the balloon
driver.

Acked-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen: gntdev: fix build warning</title>
<updated>2011-03-10T00:59:19+00:00</updated>
<author>
<name>Ian Campbell</name>
<email>ian.campbell@citrix.com</email>
</author>
<published>2011-03-08T16:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=38eaeb0fd8819dce424a61579500bd9987d5c930'/>
<id>38eaeb0fd8819dce424a61579500bd9987d5c930</id>
<content type='text'>
addr is actually a virtual address so use an unsigned long. Fixes:

  CC      drivers/xen/gntdev.o
drivers/xen/gntdev.c: In function 'map_grant_pages':
drivers/xen/gntdev.c:268: warning: cast from pointer to integer of different size

Reduce the scope of the variable at the same time.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
addr is actually a virtual address so use an unsigned long. Fixes:

  CC      drivers/xen/gntdev.o
drivers/xen/gntdev.c: In function 'map_grant_pages':
drivers/xen/gntdev.c:268: warning: cast from pointer to integer of different size

Reduce the scope of the variable at the same time.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Add cast to pointer</title>
<updated>2011-02-23T15:10:34+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-23T13:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f4ee4af447b67135de7eb8a6615811c13ce938e2'/>
<id>f4ee4af447b67135de7eb8a6615811c13ce938e2</id>
<content type='text'>
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Fix incorrect use of zero handle</title>
<updated>2011-02-23T15:10:34+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-23T13:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=77c35acb7c81cd94c6b30a3bef488dd2d8145131'/>
<id>77c35acb7c81cd94c6b30a3bef488dd2d8145131</id>
<content type='text'>
The handle with numeric value 0 is a valid map handle, so it cannot
be used to indicate that a page has not been mapped. Use -1 instead.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The handle with numeric value 0 is a valid map handle, so it cannot
be used to indicate that a page has not been mapped. Use -1 instead.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: prevent using UNMAP_NOTIFY_CLEAR_BYTE on read-only mappings</title>
<updated>2011-02-14T19:16:23+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-09T23:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9960be970cea52c1cb7d7c747ff6da367e1c01b5'/>
<id>9960be970cea52c1cb7d7c747ff6da367e1c01b5</id>
<content type='text'>
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Avoid double-mapping memory</title>
<updated>2011-02-14T19:16:22+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-09T21:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=12996fc38a2d760f3b30c9ceae26d0eeb92fe52d'/>
<id>12996fc38a2d760f3b30c9ceae26d0eeb92fe52d</id>
<content type='text'>
If an already-mapped area of the device was mapped into userspace a
second time, a hypercall was incorrectly made to remap the memory
again. Avoid the hypercall on later mmap calls, and fail the mmap call
if a writable mapping is attempted on a read-only range.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an already-mapped area of the device was mapped into userspace a
second time, a hypercall was incorrectly made to remap the memory
again. Avoid the hypercall on later mmap calls, and fail the mmap call
if a writable mapping is attempted on a read-only range.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Avoid unmapping ranges twice</title>
<updated>2011-02-14T19:16:21+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-09T20:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b57c18694ea1641b691fa05ed8af0ce339fa430b'/>
<id>b57c18694ea1641b691fa05ed8af0ce339fa430b</id>
<content type='text'>
In paravirtualized domains, mn_invl_page or mn_invl_range_start can
unmap a segment of a mapped region without unmapping all pages. When
the region is later released, the pages will be unmapped twice, leading
to an incorrect -EINVAL return.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In paravirtualized domains, mn_invl_page or mn_invl_range_start can
unmap a segment of a mapped region without unmapping all pages. When
the region is later released, the pages will be unmapped twice, leading
to an incorrect -EINVAL return.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-gntdev: Use map-&gt;vma for checking map validity</title>
<updated>2011-02-14T19:16:20+00:00</updated>
<author>
<name>Daniel De Graaf</name>
<email>dgdegra@tycho.nsa.gov</email>
</author>
<published>2011-02-09T20:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=84e4075d60fc8f1c0b937765620bc784dd0c3d39'/>
<id>84e4075d60fc8f1c0b937765620bc784dd0c3d39</id>
<content type='text'>
The is_mapped flag used to be set at the completion of the map operation,
but was not checked in all error paths. Use map-&gt;vma instead, which will
now be cleared if the initial grant mapping fails.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The is_mapped flag used to be set at the completion of the map operation,
but was not checked in all error paths. Use map-&gt;vma instead, which will
now be cleared if the initial grant mapping fails.

Signed-off-by: Daniel De Graaf &lt;dgdegra@tycho.nsa.gov&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
