<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/misc, branch v4.20</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-05T09:37:29Z</updated>
<entry>
<title>usb: appledisplay: Add 27" Apple Cinema Display</title>
<updated>2018-12-05T09:37:29Z</updated>
<author>
<name>Alexander Theissen</name>
<email>alex.theissen@me.com</email>
</author>
<published>2018-12-04T22:43:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7859905301880ad3e16272399d26900af3ac496'/>
<id>urn:sha1:d7859905301880ad3e16272399d26900af3ac496</id>
<content type='text'>
Add another Apple Cinema Display to the list of supported displays.

Signed-off-by: Alexander Theissen &lt;alex.theissen@me.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: misc: appledisplay: add 20" Apple Cinema Display</title>
<updated>2018-11-07T12:23:18Z</updated>
<author>
<name>Mattias Jacobsson</name>
<email>2pi@mok.nu</email>
</author>
<published>2018-10-21T09:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6501f49199097b99e4e263644d88c90d1ec1060'/>
<id>urn:sha1:f6501f49199097b99e4e263644d88c90d1ec1060</id>
<content type='text'>
Add another Apple Cinema Display to the list of supported displays

Signed-off-by: Mattias Jacobsson &lt;2pi@mok.nu&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: misc: appledisplay: fix backlight update_status return code</title>
<updated>2018-10-18T17:44:39Z</updated>
<author>
<name>Mattias Jacobsson</name>
<email>2pi@mok.nu</email>
</author>
<published>2018-10-16T12:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=090158555ff8d194a98616034100b16697dd80d0'/>
<id>urn:sha1:090158555ff8d194a98616034100b16697dd80d0</id>
<content type='text'>
Upon success the update_status handler returns a positive number
corresponding to the number of bytes transferred by usb_control_msg.
However the return code of the update_status handler should indicate if
an error occurred(negative) or how many bytes of the user's input to sysfs
that was consumed. Return code zero indicates all bytes were consumed.

The bug can for example result in the update_status handler being called
twice, the second time with only the "unconsumed" part of the user's input
to sysfs. Effectively setting an incorrect brightness.

Change the update_status handler to return zero for all successful
transactions and forward usb_control_msg's error code upon failure.

Signed-off-by: Mattias Jacobsson &lt;2pi@mok.nu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.19-rc4 into usb-next</title>
<updated>2018-09-16T20:44:14Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-09-16T20:44:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1652a83fa494b12e20fc02a2cc3ddbcd75d53170'/>
<id>urn:sha1:1652a83fa494b12e20fc02a2cc3ddbcd75d53170</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: misc: fix obsolete function</title>
<updated>2018-09-10T18:06:48Z</updated>
<author>
<name>Ding Xiang</name>
<email>dingxiang@cmss.chinamobile.com</email>
</author>
<published>2018-08-30T09:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d20bca54b6a92dff75e85dce29b202847b48232'/>
<id>urn:sha1:9d20bca54b6a92dff75e85dce29b202847b48232</id>
<content type='text'>
simple_strtoul is obsolete, and use kstrtoint instead

Signed-off-by: Ding Xiang &lt;dingxiang@cmss.chinamobile.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: iowarrior: replace kmalloc with kmalloc_array</title>
<updated>2018-09-10T18:05:28Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-23T17:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23feefda22392d44ee4101dfcf946bc87a6c74b3'/>
<id>urn:sha1:23feefda22392d44ee4101dfcf946bc87a6c74b3</id>
<content type='text'>
A common flaw in the kernel is integer overflow during memory allocation
size calculations. In an effort to reduce the frequency of these bugs,
kmalloc_array was implemented, which allocates memory for an array,
while at the same time detects integer overflow.

This patch replaces cases of:

	kmalloc(a * b, gfp)

with:
	kmalloc_array(a, b, gfp)

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: misc: uss720: Fix two sleep-in-atomic-context bugs</title>
<updated>2018-09-05T12:36:53Z</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2018-09-01T08:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc8acc214d3f1cafebcbcd101a695bbac716595d'/>
<id>urn:sha1:bc8acc214d3f1cafebcbcd101a695bbac716595d</id>
<content type='text'>
async_complete() in uss720.c is a completion handler function for the
USB driver. So it should not sleep, but it is can sleep according to the
function call paths (from bottom to top) in Linux-4.16.

[FUNC] set_1284_register(GFP_KERNEL)
drivers/usb/misc/uss720.c, 372:
  set_1284_register in parport_uss720_frob_control
drivers/parport/ieee1284.c, 560:
  [FUNC_PTR]parport_uss720_frob_control in parport_ieee1284_ack_data_avail
drivers/parport/ieee1284.c, 577:
  parport_ieee1284_ack_data_avail in parport_ieee1284_interrupt
./include/linux/parport.h, 474:
  parport_ieee1284_interrupt in parport_generic_irq
drivers/usb/misc/uss720.c, 116:
  parport_generic_irq in async_complete

[FUNC] get_1284_register(GFP_KERNEL)
drivers/usb/misc/uss720.c, 382:
  get_1284_register in parport_uss720_read_status
drivers/parport/ieee1284.c, 555:
  [FUNC_PTR]parport_uss720_read_status in parport_ieee1284_ack_data_avail
drivers/parport/ieee1284.c, 577:
  parport_ieee1284_ack_data_avail in parport_ieee1284_interrupt
./include/linux/parport.h, 474:
  parport_ieee1284_interrupt in parport_generic_irq
drivers/usb/misc/uss720.c, 116:
  parport_generic_irq in async_complete

Note that [FUNC_PTR] means a function pointer call is used.

To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC.

These bugs are found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: yurex: Check for truncation in yurex_read()</title>
<updated>2018-09-05T11:27:06Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-08-15T20:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14427b86837a4baf1c121934c6599bdb67dfa9fc'/>
<id>urn:sha1:14427b86837a4baf1c121934c6599bdb67dfa9fc</id>
<content type='text'>
snprintf() always returns the full length of the string it could have
printed, even if it was truncated because the buffer was too small.
So in case the counter value is truncated, we will over-read from
in_buffer and over-write to the caller's buffer.

I don't think it's actually possible for this to happen, but in case
truncation occurs, WARN and return -EIO.

Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: yurex: Fix buffer over-read in yurex_write()</title>
<updated>2018-09-05T11:27:06Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben.hutchings@codethink.co.uk</email>
</author>
<published>2018-08-15T20:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e10f14ebface44a48275c8d6dc1caae3668d5a9'/>
<id>urn:sha1:7e10f14ebface44a48275c8d6dc1caae3668d5a9</id>
<content type='text'>
If the written data starts with a digit, yurex_write() tries to parse
it as an integer using simple_strtoull().  This requires a null-
terminator, and currently there's no guarantee that there is one.

(The sample program at
https://github.com/NeoCat/YUREX-driver-for-Linux/blob/master/sample/yurex_clock.pl
writes an integer without a null terminator.  It seems like it must
have worked by chance!)

Always add a null byte after the written data.  Enlarge the buffer
to allow for this.

Cc: stable@vger.kernel.org
Signed-off-by: Ben Hutchings &lt;ben.hutchings@codethink.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc5 into usb-next</title>
<updated>2018-07-16T07:09:24Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-16T07:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=500f0716b5f7fd6b0ff3d045588c7588ce2eee1d'/>
<id>urn:sha1:500f0716b5f7fd6b0ff3d045588c7588ce2eee1d</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
