). On the device side there is no "reset" of the notification
transimission and thus we would get out of sync with the device.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class
set, if this error/event occurred on
the device side and are immeadeatly unset, if the serial state notification
was sent.
Like other drivers of real serial ports do, just the occurence of those
events should be counted in serial_icounter_struct (but no 1->0
transitions).
Signed-off-by: Tobias He
USB devices may have very limited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 112
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
typo + code structure (unneeded goto)
Tobias Herzog (4):
cdc-acm: fix possible invalid access when processing notification
cdc-acm: reassemble fragmented notifications
cdc-acm: log message for serial state notification
cdc-acm: remove unused element of struct acm
drivers/usb/class/cdc-
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class
Notifications may only be 8 bytes long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 13
Hi Oliver,
thank you for your patience... :) I have a question to one of your
comments (see below).
Best regards,
Tobias
> Am Samstag, den 18.03.2017, 19:52 +0100 schrieb Tobias Herzog:
> >
> > USB devices may have very limitited endpoint packet sizes, so that
> > not
USB devices may have very limitited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 106
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class
Notifications may only be 8 bytes so long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 11
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
issues with endianess
* check buffer allocation (kmalloc)
* don't use hard coded size of notification-header
* fixed typo + code structure (unneeded goto)
Tobias Herzog (4):
cdc-acm: reassemble fragmented notifications
cdc-acm: fix possible invalid access when processing notification
cd
Hi,
thank you for your feedback. I tried to fix all issues with v2. I was
just unsure with one point (see comment).
/tobias
> Am Dienstag, den 14.03.2017, 21:14 +0100 schrieb Tobias Herzog:
> >
> > USB devices may have very limitited endpoint packet sizes, so that
> >
USB devices may have very limitited endpoint packet sizes, so that
notifications can not be transferred within one single usb packet.
Reassembling of multiple packages may be necessary.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 102
Notifications may only be 8 bytes so long. Accessing the 9th and
10th byte of unimplemented/unknown notifications may be insecure.
Also check the length of known notifications before accessing anything
behind the 8th byte.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 11
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is
already done with USB_CDC_NOTIFY_NETWORK_CONNECTION.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm
trouble with terminals") but never used since.
Signed-off-by: Tobias Herzog
---
drivers/usb/class/cdc-acm.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class
> If they mention it, it may be more widely used.
> I'd welcome a patch for the ACM driver.
> Would you provide one?
Thank you for your reply. I think I'll give it a try.
/Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.ker
Hi,
I'm trying to build an usb device conforming to the CDC ACM device
class. The device uses an interrupt IN endpoint with a max packet size
of 8 bytes.
I tried to send a SERIAL_STATE notification to the host (to report
parity errors, etc.) and noticed, that it is not handled as I would
expect:
20 matches
Mail list logo