eturn.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_rx.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c
index 536e037f541f..4d61063c259d 100644
--- a/drivers/usb/usbip/stub_rx.c
+++ b/driver
On 12/07/2017 11:25 PM, Greg KH wrote:
> On Thu, Dec 07, 2017 at 02:16:46PM -0700, Shuah Khan wrote:
>> Jakub Jirasek from Secunia Research at Flexera reported security
>> vulnerabilities in the USB over IP driver. This patch series all
>> the 4 reported problems.
>
> N
Hi Jakub,
On 12/08/2017 08:14 AM, Secunia Research wrote:
> Hi Shuah,
>
> Thanks a lot for the quick fixes.
Thanks for finding them and doing all the leg work in
pin pointing the issues.
>
> Please, use this email address: v...@secunia.com
>
> We have assigned the
On 12/08/2017 09:33 AM, Greg KH wrote:
> On Fri, Dec 08, 2017 at 08:44:58AM -0700, Shuah Khan wrote:
>> Hi Jakub,
>>
>> On 12/08/2017 08:14 AM, Secunia Research wrote:
>>> Hi Shuah,
>>>
>>> Thanks a lot for the quick fixes.
>>
>>
thing.
>
> Signed-off-by: Alan Stern
>
> ---
>
> Shuah, I'm not sure if this will cause an interoperability problem for
> usbip. In theory, a machine running an older kernel might set the
> URB_NO_FSBR flag when communicating with a new kernel, which would
> cause an err
d));
> if (rc < 0) {
> dbg("failed to write match_busid: %s", strerror(errno));
> return -1;
>
Why not use the return value from snprintf() for length, instead of calling
strlen(command)?
thanks,
-- Shuah
--
To unsubscr
Hi Dan,
On 12/14/2017 12:58 AM, Dan Carpenter wrote:
> Hello Shuah Khan,
>
> The patch c6688ef9f297: "usbip: fix stub_rx: harden CMD_SUBMIT path
> to handle malicious input" from Dec 7, 2017, leads to the following
> static checker warning:
>
> drivers/u
- sizeof(command));
> + cmd_size);
> if (rc < 0) {
> dbg("failed to write match_busid: %s", strerror(errno));
> return -1;
>
>
> Regards,
> Juan
>
tha
On 12/14/2017 01:16 PM, Dan Carpenter wrote:
> On Thu, Dec 14, 2017 at 11:01:15AM -0700, Shuah Khan wrote:
>> Hi Dan,
>>
>> On 12/14/2017 12:58 AM, Dan Carpenter wrote:
>>> Hello Shuah Khan,
>>>
>>> The patch c6688ef9f297: "usbip: fix stub_rx:
max <= s32max)'
Reported-by: Dan Carpenter
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_rx.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/usb/usbip/stub_rx.c b/drivers/usb/usbip/stub_rx.c
index 493ac2928391..b1820ab083e1 100644
--- a/driver
SIZE + 4, "del %s",
> + busid);
>
> rc = write_sysfs_attribute(match_busid_attr_path, command,
> -sizeof(command));
> +cmd_size);
> if (rc < 0) {
> dbg("failed to write match
usbip driver is leaking socket pointer address in messages. Remove
the messages that aren't useful and print sockfd in the ones that
are useful for debugging.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_dev.c | 3 +--
drivers/usb/usbip/usbip_common.c | 16 +---
dr
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/stub_main.c | 5 +++--
drivers/usb/usbip/stub_rx.c | 7 ++-
drivers/usb/usbip/stub_tx.c | 6 +++---
3 files changed, 8 insertions(+), 10 deletions
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 10 --
drivers/usb/usbip/vhci_rx.c | 23 +++
drivers/usb/usbip/vhci_tx.c | 3 ++-
3 files changed, 13
usbip_dump_usb_device() and usbip_dump_urb() print kernel addresses.
Remove kernel addresses from usb device and urb debug msgs and improve
the message content.
Instead of printing parent device and bus addresses, print parent device
and bus names.
Signed-off-by: Shuah Khan
---
drivers/usb
Harden CMD_SUBMIT path to handle malicious input that could trigger
large memory allocations. Add checks to validate transfer_buffer_length
and number_of_packets to protect against bad input requesting for
unbounded memory allocations.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vudc_rx.c
v_send_ret_submit() handles urb with a null transfer_buffer, when it
replays a packet with potential malicious data that could contain a
null buffer.
Add a check for the condition when actual_length > 0 and transfer_buffer
is null.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vudc_tx.c |
On 12/30/2017 09:01 AM, Elad Wexler wrote:
> Fix possible resource leak: fd
>
> Signed-off-by: Elad Wexler
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubsc
On 12/30/2017 09:11 AM, Elad Wexler wrote:
> Fixup a coding style issue
>
> Signed-off-by: Elad Wexler
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe
ta_left(&msg);
> sock->sk->sk_allocation = GFP_NOIO;
>
> result = sock_recvmsg(sock, &msg, MSG_WAITALL);
>
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan
Greg, please pick this patch up.
thanks,
-- Shuah
--
To unsubscribe from thi
linked %ssynchronously\n",
>seqnum, status == -ENOENT ? "" : "a");
> break;
> case -EINPROGRESS:
>
Thanks Colin!
Acked-by: Shuah Khan
Greg, Please pick this up.
thanks,
-- Shuah
--
To unsubscribe
e
more information on how to recreate the problem and demsg from server and
client side when this problem happens.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
with
accesses via the attached busid result in errors and system hangs during
shutdown.
Fix it to check and bail out if the device is already attached to vhci_hcd.
Cc: sta...@vger.kernel.org
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_bind.c | 9 +
1 file changed, 9 insertions
: sta...@vger.kernel.org
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_list.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/tools/usb/usbip/src/usbip_list.c b/tools/usb/usbip/src/usbip_list.c
index f1b38e866dd7..d65a9f444174 100644
--- a/tools/usb/usbip/src/usbip_list.c
+++ b
ysfs/group.c:156
[] vhci_start+0x5b4/0x7a0 drivers/usb/usbip/vhci_hcd.c:978
[] usb_add_hcd+0x8da/0x1c60 drivers/usb/core/hcd.c:2867
[] vhci_hcd_probe+0x97/0x130
drivers/usb/usbip/vhci_hcd.c:1103
---
---
---[ end trace c33c7b202cf3aac8 ]---
Reported-by: Andrey Konovalov
Signed-off-by: Shuah Kha
Commit 2f2d0088eb93
("usbip: prevent vhci_hcd driver from leaking a socket pointer address")
in the /sys/devices/platform/vhci_hcd/status.
Fix the header and field alignment to reflect the changes and make it
easier to read.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_sy
anks to a script from Joe Perches, this was easily done.
>
> Reported-by: Joe Perches
> Cc: Peter Chen
> Cc: Felipe Balbi
> Cc: Johan Hovold
> Cc: Valentina Manea
> Cc: Shuah Khan
> Signed-off-by: Greg Kroah-Hartman
> ---
> drivers/usb/chipidea/o
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 25 +++--
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
that this particular case statement
is meant to fall through.
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/usb/usbip/src/usbip.c b
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Acked-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/libsrc/usbip_common.c | 9 -
tools/usb/usbip/libsrc/usbip_host_common.c | 28 +++-
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 25 +++--
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
arns that these aren't checked with
-Wformat-overflow, and with -Werror enabled in configure.ac, that makes
these tools unbuildable.
This patch fixes these problems by replacing sprintf() with snprintf()
in one place and adding checks for the return value of snprintf().
Signed-off-by: Shuah
that this particular case statement
is meant to fall through.
Reviewed-by: Peter Senna Tschudin
Signed-off-by: Jonathan Dieter
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/usb/usbip/src/usbip.c b
bad input requesting for
unbounded memory allocations. Validate early in get_pipe() and return
failure.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 30 +++---
1 file changed, 27
Upstream commit 90120d15f4c3 ("usbip: prevent leaking socket pointer
address in messages")
usbip driver is leaking socket pointer address in messages. Remove
the messages that aren't useful and print sockfd in the ones that
are useful for debugging.
Signed-off-by: Shuah Khan
Cc:
rror instead of calling BUG().
Change caller stub_recv_cmd_submit() to handle the get_pipe()
error return.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 18 +++---
1 file changed, 11 i
bug.cgi?id=109351
Signed-off-by: Andrew Goodbody
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_event.c | 5 ++-
drivers/usb/usbip/vhci_hcd.c| 88 -
drivers/usb/usbip/vhci_rx.c | 30 --
drivers
As I started backporting security fixes, I found a deadlock bug that was
fixed in a later release. This patch series contains backports for all
these problems.
Andrew Goodbody (1):
usb: usbip: Fix possible deadlocks reported by lockdep
Shuah Khan (3):
usbip: fix stub_rx: get_pipe() to
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super
Speed support. This patch backports just the change to clear the
USB_PORT_STAT_POWER.
Signed-off-by: Shuah Khan
---
dr
status file is fixed.
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/vhci_hcd.c | 2 +-
drivers/usb/usbip/vhci_sysfs.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 00d68945548e..2d96bfd34138 100644
--
Keep usbip_device sockfd state in sync with tcp_socket. When tcp_socket
is reset to null, reset sockfd to -1 to keep it in sync.
Signed-off-by: Shuah Khan
Cc: sta...@vger.kernel.org
---
drivers/usb/usbip/stub_dev.c | 3 +++
drivers/usb/usbip/vhci_hcd.c | 2 ++
2 files changed, 5 insertions
On 01/28/2018 05:14 AM, Greg KH wrote:
> On Fri, Jan 26, 2018 at 11:54:35AM -0700, Shuah Khan wrote:
>> Upstream commit 1c9de5bf4286 ("usbip: vhci-hcd: Add USB3 SuperSpeed
>> support")
>
> Hm, I think you have the wrong commit id here.
>
> I don't se
for selecting the target vhci_hcd
> device. The old functions now always target "vhci_hcd.0".
>
> So, for instance, now, "usbip port" by default only shows "vhci_hcd.0"
> ports but "usbip port -a" shows all of them, and, for instance, &q
fixed
in the first patch in this series masked this bug. With these two fixes,
client can use the imported devices on 4.4
Eric Biggers also reported the tcp_socket address still in the status
file while I am getting the patch ready. I added him to Reported-by.
Shuah Khan (2):
usbip: vhci_hcd:
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super Speed
support.
This patch isolates the one line fix to clear the USB_PORT_STAT_POWER
from the original patch.
Signed-off
et pointer address is not used at the moment
and it was made visible as a convenient way to find IP address from
socket pointer address by looking up /proc/net/{tcp,tcp6}.
As this opens a security hole, the fix replaces socket pointer address
with sockfd.
Reported-by: Eric Biggers
Signed-off-by
Upstream commit 8272d099d05f ("usbip: vhci: stop printing kernel
pointer addresses in messages")
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
Cc: stable
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/
bad input requesting for
unbounded memory allocations. Validate early in get_pipe() and return
failure.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 30 +++---
1 file changed, 27
laces socket pointer address
with sockfd.
Reported-by: Secunia Research
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_common.h | 1 +
drivers/usb/usbip/vhci_sysfs.c | 26 +++---
tools/usb/usbip/libsrc/vhci_driver.c | 8
3 files changed, 20 inserti
Upstream commit 248a22044366 ("usbip: stub: stop printing kernel
pointer addresses in messages")
Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: Shuah Khan
Cc: stable
Signed-off-by: Greg Kroah-Hartman
---
drivers
bug.cgi?id=109351
Signed-off-by: Andrew Goodbody
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Shuah Khan
---
drivers/usb/usbip/usbip_event.c | 5 ++-
drivers/usb/usbip/vhci_hcd.c| 88 -
drivers/usb/usbip/vhci_rx.c | 30 --
drivers
Upstream commit 90120d15f4c3 ("usbip: prevent leaking socket pointer
address in messages")
usbip driver is leaking socket pointer address in messages. Remove
the messages that aren't useful and print sockfd in the ones that
are useful for debugging.
Signed-off-by: Shuah Khan
Cc:
e, leaving device unusable by the client. The device is still
attached and however client can't use it.
The problem was fixed as part of larger change to add USB3 Super Speed
support.
This patch isolates the one line fix to clear the USB_PORT_STAT_POWER
from the original patch.
Signed-off
rror instead of calling BUG().
Change caller stub_recv_cmd_submit() to handle the get_pipe()
error return.
Reported-by: Secunia Research
Cc: stable
Signed-off-by: Shuah Khan
Signed-off-by: Greg Kroah-Hartman
---
drivers/usb/usbip/stub_rx.c | 16 ++--
1 file changed, 10 insertions(
arns that these aren't checked with
-Wformat-overflow, and with -Werror enabled in configure.ac, that makes
these tools unbuildable.
This patch fixes these problems by replacing sprintf() with snprintf()
in one place and adding checks for the return value of snprintf().
Signed-off-by: Shuah
):
usb: usbip: Fix possible deadlocks reported by lockdep
Shuah Khan (8):
usbip: fix stub_rx: get_pipe() to validate endpoint number
usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input
usbip: prevent vhci_hcd driver from leaking a socket pointer address
usbip: Fix
t "vhci_hcd.0".
>
> So, for instance, now, "usbip port" by default only shows "vhci_hcd.0"
> ports but "usbip port -a" shows all of them, and, for instance, "usbip
> port -i 4", shows the ports in "vhci_hcd.4".
>
I am going to
we don't have */
> - if (!udc || !udc->driver || !udc->pullup) {
> - dev_err(dev, "no device or gadget not bound");
> + if (!udc->driver || !udc->pullup) {
> + dev_err(dev, "gadget not bound");
> ret = -
sfer_buffer_length > ((~0 >> 1))) =>
(s32min-s32max > s32max)'
drivers/staging/usbip/stub_rx.c:501 stub_recv_cmd_submit() warn: always
true condition '(pdu->u.cmd_submit.transfer_buffer_length <= ((~0 >>
1))) => (s32min-s32max <= s32max)'
Reported-
Attach device error message is cryptic and useless. Fix it to be
informative.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_attach.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/usb/usbip/src/usbip_attach.c
b/tools/usb/usbip/src/usbip_attach.c
index
Kernel and tool version mismatch message is cryptic. Fix it to be
informative.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_network.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/usb/usbip/src/usbip_network.c
b/tools/usb/usbip/src/usbip_network.c
On 02/27/2018 03:45 PM, Krzysztof Opasiak wrote:
>
>
> On 02/27/2018 11:23 PM, Shuah Khan wrote:
>> Attach device error message is cryptic and useless. Fix it to be
>> informative.
>>
>> Signed-off-by: Shuah Khan
>> ---
>> tools/usb/usbip/src/
On 03/05/2018 02:00 AM, Salvador Fandiño wrote:
> On 02/21/2018 01:35 AM, Shuah Khan wrote:
>> Hi Salvador,
>>
>> On 01/30/2018 01:36 AM, Salvador Fandino wrote:
>>> Let me start by explaining the problem that have motivated me to write
>>> this patche
On 03/06/2018 01:35 AM, Salvador Fandiño wrote:
>
>
> On 03/06/2018 01:03 AM, Shuah Khan wrote:
>> On 03/05/2018 02:00 AM, Salvador Fandiño wrote:
>>> On 02/21/2018 01:35 AM, Shuah Khan wrote:
>>>> Hi Salvador,
>>>>
>>>> On 01/30/
)
- when a client requests a device that isn't exportable,
usbip attach -r server_name -b 3-10.4
usbip: error: Attach Request for 3-10.4 failed - Device not found
Signed-off-by: Shuah Khan
---
tools/usb/usbip/src/usbip_attach.c | 11 +--
tools/usb/usbip/src/usbip_list.c
uest for 3-10.4 failed - Device not found
Shuah Khan (3):
usbip: tools: add more error codes for usbip request/reply messages
usbip: usbip_host_common: Use new error codes to return request status
usbip: tools: change to use new error codes in server reply messages
tools/usb/usbip/libsrc
lient.
Existing defines are moved to a common header in libsrc to be included
in the libusbip_la-usbip_common.o to be used by all the usbip tools.
Supporting interface to print error strings is added to the common lib.
Signed-off-by: Shuah Khan
---
tools/usb/usbip/libsrc/usbip_common.c
Currently ST_OK and ST_NA are the only values used to communicate
status of a request from a client. Use new error codes to clearly
indicate what failed. For example, when client sends request to
import a device that isn't export-able, send ST_DEV_BUSY to the client.
Signed-off-by: Shuah
On 04/10/2017 04:38 PM, Yuyang Du wrote:
> Hi Shuah,
>
> Could you please take a look at these patches? I got more patches
> that sit on these to send out.
Please bear with me. I was out sick most of last week. Still catching
up. Go ahead and send the patches, no need to wait.
* wants to set this to a different value, we need to add a
* setting and update GCTL.RAMCLKSEL here.
*/
I can debug this more dumping GCTL.RAMCLKSEL registers in cold boot
vs. hotplig cases to get more information.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
SB/IP: add client driver")
> Cc: Takahiro Hirofuchi
> Cc: Valentina Manea
> Cc: Shuah Khan
> Signed-off-by: Johan Hovold
Change looks reasonable to me. Why did you send v2 so quickly.
v1 and v2 look identical to me. Please mention the changes if any
made to v1 when you send v2
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> Hi Shuah,
>
> SuperSpeed (only) USB devices cannot be shared via usbip. This
> patch series attempts to fix it.
>
> The first 5 patches refactors the existing code to prepare for the
> SuperSpeed addition. With this series, our Su
o send another version to fix this?
>
Yes. Please resend fixing this. I am surprised checkpatch.pl
didn't catch it!
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ks good. Thanks for the fix.
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> v1 -> v2: - rephrased patch subject from:
> "usb: usbip: avoid the usb layer to kfree our allocated buffer"
> - changed to always let urb_destoy remove the transfer_buffer
&g
roduced configurable numbers of
> controllers and ports, but we have a static port number maximum,
> MAXNPORT. If exceeded, the idev array will be overflown. We fix
> it by validating the nports to make sure the port number max is
> not exceeded.
>
> Reviewed-by: Krzysztof Opasi
ff-by: Yuyang Du
Looks good.
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> tools/usb/usbip/libsrc/vhci_driver.c | 36
>
> tools/usb/usbip/libsrc/vhci_driver.h | 1 +
> 2 files changed, 37 insertions(+)
>
> diff --git a/tools/usb/us
t;
> Reviewed-by: Krzysztof Opasiak
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> tools/usb/usbip/libsrc/vhci_driver.c | 27 +--
> 1 file changed, 21 insertions(+), 6 deletions(-)
>
> diff --git a/tools/usb/usbip
vhci_driver->idev's for it to parse.
>
> Reviewed-by: Krzysztof Opasiak
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> tools/usb/usbip/libsrc/vhci_driver.c | 38
> ++--
> tools/usb/usbip/src/usbip_attach.
t; vdev_to_vhci_hcd()
>
> Signed-off-by: Yuyang Du
Thanks. Looks good to me.
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/usbip/vhci.h | 11 +--
> drivers/usb/usbip/vhci_hcd.c | 34 +-
> drivers/usb/usbip/
raction, vhci, and thus this vhci structure.
>
> Signed-off-by: Yuyang Du
Looks good.
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/usbip/vhci.h | 12 +++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/usbip/vhci.h b/d
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> Every VHCI is a platform device, so move the platform_device struct
> into the VHCI struct.
>
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/usbip/vhci.h
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> A vhci struct is added as the platform-specific data to the vhci
> platform device, in order to get the vhci by its platform device.
> This is done in vhci_hcd_init().
>
> Signed-off-by: Yuyang Du
Acked-by
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> This patch enables the new vhci structure. Its lock protects
> both the USB2 hub and the shared USB3 hub.
>
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/
f Opasiak
> Signed-off-by: Yuyang Du
> Signed-off-by: Yuyang Du
Do you need this second signed-off??
Otherwise looks good.
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/usbip/vhci.h | 7 +-
> drivers/usb/usbip/vhci_hcd.c | 323
>
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> With this patch, USB_SPEED_SUPER is a valid speed when attaching
> a USB3 SuperSpeed device.
>
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/usb/usbip/vhci_sysfs.c |
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> As USB3 has (slightly) different bit meanings in the port
> status. Add a new status bit array for USB3.
>
> Signed-off-by: Yuyang Du
Acked-by: Shuah Khan
thanks,
-- Shuah
> ---
> drivers/u
On 05/18/2017 04:08 AM, Yuyang Du wrote:
> From: Yuyang Du
>
> Each vhci has 2*VHCI_HC_PORTS ports, in which VHCI_HC_PORTS
> ports are HighSpeed (or below), and VHCI_HC_PORTS are SuperSpeed.
> This new macro VHCI_PORTS reflects this configuration.
>
> Signed-off-by: Yuyang
On 06/09/2017 03:03 AM, Greg Kroah-Hartman wrote:
> We are trying to get rid of DRIVER_ATTR(), and the usbip driver
> attribute can be trivially changed to use DRIVER_ATTR_RW().
>
> Cc: Valentina Manea
> Cc: Shuah Khan
> Cc:
> Signed-off-by: Greg Kroah-Hartman
Looks
ret;
>>
>> Thanks,
>> Yuyang
I am assuming you are planning to send a proper patch for this problem
that can be applied.
thanks,
-- Shuah
>>
>> On Fri, Jun 23, 2017 at 01:46:01PM +0300, Dan Carpenter wrote:
>>> Hello Yuyang Du,
>>>
>&
> struct usb_hcd *hcd_hs;
> struct usb_hcd *hcd_ss;
> int ret;
>
Looks good to me.
Acked-by: Shuah Khan
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
rsion to the syslog at init time, which is not
> necessary at all.
>
> Cc: Valentina Manea
> Cc: Shuah Khan
> Signed-off-by: Greg Kroah-Hartman
> ---
> drivers/usb/usbip/stub_main.c| 2 --
> drivers/usb/usbip/usbip_common.c | 2 --
> drivers/usb/usbip/usbip_common.h
udev->devnum, udev->speed);
> + if (rc < 0 && errno != EBUSY) {
> + err("import device");
> + goto err_driver_close;
> + }
> + } while (rc < 0);
>
> usbip_vhci_driver_close();
>
> return port;
> +
> +err_driver_close:
> + usbip_vhci_driver_close();
> +err_out:
> + return -1;
> }
>
> static int query_import_device(int sockfd, char *busid)
>
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/08/2017 03:11 AM, fx IWATA NOBUO wrote:
> Hello,
>
>> -Original Message-----
>> From: Shuah Khan [mailto:sh...@kernel.org]
>> Sent: Thursday, August 03, 2017 2:27 AM
>> To: fx IWATA NOBUO ;
>> valentina.mane...@gmail.com; gre...@linuxfoundation.org
t it's exaggerated for this special condition. The locking
> itself has done in driver.
> As an alternate solution, userspace doesn't specify port number, driver
> searches unused port and it returns port number to the userspace. With
> this solution, the interface is much different
struct hc_driver vhci_hc_driver = {
> +static const struct hc_driver vhci_hc_driver = {
> .description= driver_name,
> .product_desc = driver_desc,
> .hcd_priv_size = sizeof(struct vhci_hcd),
>
Looks good to me.
Acked-by: Shuah Khan
thanks,
-- Shuah
--
T
sysname(plat);
> - strncpy(dev->busid, name, SYSFS_BUS_ID_SIZE);
> + snprintf(dev->busid, SYSFS_BUS_ID_SIZE, "%s", name);
I am okay with the change to use snprintf(). Please add check for
return to avoid GCC 7 -Wformat-overflow wanrs on snprintf instances
that don't check return.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/26/2018 04:39 AM, Ben Hutchings wrote:
> On Tue, 2018-07-24 at 11:04 -0600, Shuah Khan wrote:
>> On 07/20/2018 08:12 PM, Ben Hutchings wrote:
>>> gcc 8 reports:
>>>
>>> usbip_device_driver.c: In function ‘read_usb_vudc_device’:
>>> usbip_devi
appspot.com/x/repro.c?x=14ed8ab640
I was able to reproduce the problem with the C reproducer and fixed it.
Here is fix:
https://patchwork.kernel.org/patch/10628833/
Sudip verified the patch.
thanks,
-- Shuah
in.c:953 [inline]
> do_initcalls init/main.c:961 [inline]
> do_basic_setup init/main.c:979 [inline]
> kernel_init_freeable+0x4bb/0x5ac init/main.c:1144
> kernel_init+0x11/0x1b6 init/main.c:1063
> ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413
>
thanks,
-- Shuah
On 09/07/2018 10:14 AM, Dmitry Vyukov wrote:
> On Fri, Sep 7, 2018 at 6:03 PM, Shuah Khan wrote:
>> Hi Dmitry,
>>
>> On 09/07/2018 04:54 AM, Dmitry Vyukov wrote:
>>> Hi,
>>>
>>> I am getting the following error while booting kernel on upstream
>
201 - 300 of 319 matches
Mail list logo