diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2006-06-09 23:10:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:17 -0400 |
commit | 5b1c674d223eef6c6494be8be91e9e3a3054817e (patch) | |
tree | 4f7cbbc36d90ec00cd9f958b62cbfc87f550f34f /drivers/usb/mon/mon_text.c | |
parent | 4bc203d997c0dc1eada4cc9681372c2f7a456c46 (diff) |
[PATCH] USB: update usbmon, fix glued lines
This update contains one bug fix: some lines can come out truncated,
because of the safety cutoff. This happened because I forgot to update
the size when status packets began to be printed.
The rest is:
- Comments updates
- Allow snooping with pkmap on x86_64, which is cache-coherent
- Enlarge event buffers (certainly we can have a couple of pages)
- Add event counter
First touch upon usbmon for 2.6.18.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/mon/mon_text.c')
-rw-r--r-- | drivers/usb/mon/mon_text.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index ac043ec2b8dc..9f9236bf62d2 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c | |||
@@ -26,10 +26,13 @@ | |||
26 | 26 | ||
27 | /* | 27 | /* |
28 | * This limit exists to prevent OOMs when the user process stops reading. | 28 | * This limit exists to prevent OOMs when the user process stops reading. |
29 | * If usbmon were available to unprivileged processes, it might be open | ||
30 | * to a local DoS. But we have to keep to root in order to prevent | ||
31 | * password sniffing from HID devices. | ||
29 | */ | 32 | */ |
30 | #define EVENT_MAX 25 | 33 | #define EVENT_MAX (2*PAGE_SIZE / sizeof(struct mon_event_text)) |
31 | 34 | ||
32 | #define PRINTF_DFL 130 | 35 | #define PRINTF_DFL 160 |
33 | 36 | ||
34 | struct mon_event_text { | 37 | struct mon_event_text { |
35 | struct list_head e_link; | 38 | struct list_head e_link; |
@@ -111,7 +114,7 @@ static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb, | |||
111 | * number of corner cases, but it seems that the following is | 114 | * number of corner cases, but it seems that the following is |
112 | * more or less safe. | 115 | * more or less safe. |
113 | * | 116 | * |
114 | * We do not even try to look transfer_buffer, because it can | 117 | * We do not even try to look at transfer_buffer, because it can |
115 | * contain non-NULL garbage in case the upper level promised to | 118 | * contain non-NULL garbage in case the upper level promised to |
116 | * set DMA for the HCD. | 119 | * set DMA for the HCD. |
117 | */ | 120 | */ |