<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/usb/core/devio.c, branch v3.2-rc5</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>user namespace: usb: make usb urbs user namespace aware (v2)</title>
<updated>2011-09-29T20:13:08+00:00</updated>
<author>
<name>Serge Hallyn</name>
<email>serge.hallyn@canonical.com</email>
</author>
<published>2011-09-26T15:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d178bc3a708f39cbfefc3fab37032d3f2511b4ec'/>
<id>d178bc3a708f39cbfefc3fab37032d3f2511b4ec</id>
<content type='text'>
Add to the dev_state and alloc_async structures the user namespace
corresponding to the uid and euid.  Pass these to kill_pid_info_as_uid(),
which can then implement a proper, user-namespace-aware uid check.

Changelog:
Sep 20: Per Oleg's suggestion: Instead of caching and passing user namespace,
	uid, and euid each separately, pass a struct cred.
Sep 26: Address Alan Stern's comments: don't define a struct cred at
	usbdev_open(), and take and put a cred at async_completed() to
	ensure it lasts for the duration of kill_pid_info_as_cred().

Signed-off-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add to the dev_state and alloc_async structures the user namespace
corresponding to the uid and euid.  Pass these to kill_pid_info_as_uid(),
which can then implement a proper, user-namespace-aware uid check.

Changelog:
Sep 20: Per Oleg's suggestion: Instead of caching and passing user namespace,
	uid, and euid each separately, pass a struct cred.
Sep 26: Address Alan Stern's comments: don't define a struct cred at
	usbdev_open(), and take and put a cred at async_completed() to
	ensure it lasts for the duration of kill_pid_info_as_cred().

Signed-off-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb/core/devio.c: Check for printer class specific request</title>
<updated>2011-09-26T23:30:47+00:00</updated>
<author>
<name>Matthias Dellweg</name>
<email>2500@gmx.de</email>
</author>
<published>2011-09-25T12:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=393cbb5151ecda9f9e14e3082d048dd27a1ff9f6'/>
<id>393cbb5151ecda9f9e14e3082d048dd27a1ff9f6</id>
<content type='text'>
In the usb printer class specific request get_device_id the value of
wIndex is (interface &lt;&lt; 8 | altsetting) instead of just interface.
This enables the detection of some printers with libusb.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Matthias Dellweg &lt;2500@gmx.de&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the usb printer class specific request get_device_id the value of
wIndex is (interface &lt;&lt; 8 | altsetting) instead of just interface.
This enables the detection of some printers with libusb.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Matthias Dellweg &lt;2500@gmx.de&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid</title>
<updated>2011-09-26T23:12:26+00:00</updated>
<author>
<name>Serge Hallyn</name>
<email>serge.hallyn@canonical.com</email>
</author>
<published>2011-09-26T15:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aec01c5895051849ed842dc5b8794017a7751f28'/>
<id>aec01c5895051849ed842dc5b8794017a7751f28</id>
<content type='text'>
Alan Stern points out that after spin_unlock(&amp;ps-&gt;lock) there is no
guarantee that ps-&gt;pid won't be freed.  Since kill_pid_info_as_uid() is
called after the spin_unlock(), the pid passed to it must be pinned.

Reported-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alan Stern points out that after spin_unlock(&amp;ps-&gt;lock) there is no
guarantee that ps-&gt;pid won't be freed.  Since kill_pid_info_as_uid() is
called after the spin_unlock(), the pid passed to it must be pinned.

Reported-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Do not pass negative length to snoop_urb()</title>
<updated>2011-03-23T20:14:16+00:00</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2011-03-15T15:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d02b42614149ebccf12c9c580601ed01bd83070'/>
<id>9d02b42614149ebccf12c9c580601ed01bd83070</id>
<content type='text'>
When `echo Y &gt; /sys/module/usbcore/parameters/usbfs_snoop` and
usb_control_msg() returns error, a lot of kernel memory is dumped to dmesg
until unhandled kernel paging request occurs.

Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `echo Y &gt; /sys/module/usbcore/parameters/usbfs_snoop` and
usb_control_msg() returns error, a lot of kernel memory is dumped to dmesg
until unhandled kernel paging request occurs.

Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>BKL: remove extraneous #include &lt;smp_lock.h&gt;</title>
<updated>2010-11-17T16:59:32+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-11-17T15:26:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=451a3c24b0135bce54542009b5fde43846c7cf67'/>
<id>451a3c24b0135bce54542009b5fde43846c7cf67</id>
<content type='text'>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.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>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb: core: fix information leak to userland</title>
<updated>2010-11-11T15:14:07+00:00</updated>
<author>
<name>Vasiliy Kulikov</name>
<email>segooon@gmail.com</email>
</author>
<published>2010-11-06T14:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=886ccd4520064408ce5876cfe00554ce52ecf4a7'/>
<id>886ccd4520064408ce5876cfe00554ce52ecf4a7</id>
<content type='text'>
Structure usbdevfs_connectinfo is copied to userland with padding byted
after "slow" field uninitialized.  It leads to leaking of contents of
kernel stack memory.

Signed-off-by: Vasiliy Kulikov &lt;segooon@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Structure usbdevfs_connectinfo is copied to userland with padding byted
after "slow" field uninitialized.  It leads to leaking of contents of
kernel stack memory.

Signed-off-by: Vasiliy Kulikov &lt;segooon@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB-BKL: Convert usb_driver ioctl to unlocked_ioctl</title>
<updated>2010-08-10T21:35:35+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2010-06-01T21:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c532b29a6f6d31e84a7c88f995eebdc75ebd4248'/>
<id>c532b29a6f6d31e84a7c88f995eebdc75ebd4248</id>
<content type='text'>
And audit all the users. None needed the BKL.  That was easy
because there was only very few around.

Tested with allmodconfig build on x86-64

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
From: Andi Kleen &lt;ak@linux.intel.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And audit all the users. None needed the BKL.  That was easy
because there was only very few around.

Tested with allmodconfig build on x86-64

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
From: Andi Kleen &lt;ak@linux.intel.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: make hcd.h public (drivers dependency)</title>
<updated>2010-05-20T20:21:30+00:00</updated>
<author>
<name>Eric Lescouet</name>
<email>Eric.Lescouet@virtuallogix.com</email>
</author>
<published>2010-04-24T21:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27729aadd31dafddaaf64c24f8ef6d0ff750f3aa'/>
<id>27729aadd31dafddaaf64c24f8ef6d0ff750f3aa</id>
<content type='text'>
The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/

Signed-of-by: Eric Lescouet &lt;eric@lescouet.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/

Signed-of-by: Eric Lescouet &lt;eric@lescouet.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: fix usbfs regression</title>
<updated>2010-03-19T14:24:02+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-03-06T20:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7152b592593b9d48b33f8997b1dfd6df9143f7ec'/>
<id>7152b592593b9d48b33f8997b1dfd6df9143f7ec</id>
<content type='text'>
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers.  The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.

Reported-by: Markus Rechberger &lt;mrechberger@gmail.com&gt;
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers.  The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.

Reported-by: Markus Rechberger &lt;mrechberger@gmail.com&gt;
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>USB: usbfs_snoop: add data logging back in</title>
<updated>2010-03-02T22:54:37+00:00</updated>
<author>
<name>Chris Frey</name>
<email>cdfrey@foursquare.net</email>
</author>
<published>2010-01-26T22:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0880aef49e40abd1ed34ab713e8b024e8bc2021e'/>
<id>0880aef49e40abd1ed34ab713e8b024e8bc2021e</id>
<content type='text'>
Uses the new snoop function from commit 4c6e8971cbe0148085,
but includes the buffer data where appropriate, as before.

Signed-off-by: Chris Frey &lt;cdfrey@foursquare.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uses the new snoop function from commit 4c6e8971cbe0148085,
but includes the buffer data where appropriate, as before.

Signed-off-by: Chris Frey &lt;cdfrey@foursquare.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
