1. 27 Sep, 2009 1 commit
  2. 23 Sep, 2009 2 commits
    • Pete Zaitcev's avatar
      USB: usbmon: end ugly tricks with DMA peeking · 4e9e9200
      Pete Zaitcev authored
      This patch fixes crashes when usbmon attempts to access GART aperture.
      The old code attempted to take a bus address and convert it into a
      virtual address, which clearly was impossible on systems with actual
      IOMMUs. Let us not persist in this foolishness, and use transfer_buffer
      in all cases instead.
      
      I think downsides are negligible. The ones I see are:
       - A driver may pass an address of one buffer down as transfer_buffer,
         and entirely different entity mapped for DMA, resulting in misleading
         output of usbmon. Note, however, that PIO based controllers would
         do transfer the same data that usbmon sees here.
       - Out of tree drivers may crash usbmon if they store garbage in
         transfer_buffer. I inspected the in-tree drivers, and clarified
         the documentation in comments.
       - Drivers that use get_user_pages will not be possible to monitor.
         I only found one driver with this problem (drivers/staging/rspiusb).
       - Same happens with with usb_storage transferring from highmem, but
         it works fine on 64-bit systems, so I think it's not a concern.
         At least we don't crash anymore.
      
      Why didn't we do this in 2.6.10? That's because back in those days
      it was popular not to fill in transfer_buffer, so almost all
      traffic would be invisible (e.g. all of HID was like that).
      But now, the tree is almost 100% PIO friendly, so we can do the
      right thing at last.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4e9e9200
    • Pete Zaitcev's avatar
      USB: usbmon: drop Kconfig defaults · b07f4d01
      Pete Zaitcev authored
      These statements seem to be unnecessary. No idea why, but I built all
      possible configurations and everything gets built just as before.
      
      It's an old patch that popped from discussion with Paul in November 2008.
      Obviously not a very high priority but better late than never.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b07f4d01
  3. 06 Jul, 2009 1 commit
    • Kevin Cernekee's avatar
      Fix virt_to_phys() warnings · 5bfd7560
      Kevin Cernekee authored
      These warnings were observed on MIPS32 using 2.6.31-rc1 and gcc-4.2.0:
      
      mm/page_alloc.c: In function 'alloc_pages_exact':
      mm/page_alloc.c:1986: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
      
      drivers/usb/mon/mon_bin.c: In function 'mon_alloc_buff':
      drivers/usb/mon/mon_bin.c:1264: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast
      
      [akpm@linux-foundation.org: fix kernel/perf_counter.c too]
      Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5bfd7560
  4. 16 Jun, 2009 1 commit
  5. 24 Mar, 2009 1 commit
  6. 28 Jan, 2009 1 commit
    • Pete Zaitcev's avatar
      USB: usbmon: Implement compat_ioctl · 7abce6be
      Pete Zaitcev authored
      Running a 32-bit usbmon(8) on 2.6.28-rc9 produces the following:
      ioctl32(usbmon:28563): Unknown cmd fd(3) cmd(400c9206){t:ffffff92;sz:12} arg(ffd3f458) on /dev/usbmon0
      
      It happens because the compatibility mode was implemented for 2.6.18
      and not updated for the fsops.compat_ioctl API.
      
      This patch relocates the pieces from under #ifdef CONFIG_COMPAT into
      compat_ioctl with no other changes except one new whitespace.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7abce6be
  7. 07 Jan, 2009 1 commit
  8. 20 Nov, 2008 1 commit
    • Pete Zaitcev's avatar
      USB: usbmon: fix read(2) · f1c0a2a3
      Pete Zaitcev authored
      There's a bug in the usbmon binary reader: When using read() to fetch
      the packets and a packet's data is partially read, the next read call
      will once again return up to len_cap bytes of data. The b_read counter
      is not regarded when determining the remaining chunk size.
      
      So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while
      reading from a USB storage device and analyzing the dump file
      afterwards it will get out of sync after a couple of packets.
      Signed-off-by: default avatarIngo van Lil <inguin@gmx.de>
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f1c0a2a3
  9. 17 Oct, 2008 1 commit
  10. 16 Oct, 2008 1 commit
  11. 26 Jul, 2008 1 commit
  12. 22 Jul, 2008 1 commit
  13. 21 Jul, 2008 1 commit
  14. 20 Jun, 2008 1 commit
  15. 25 Apr, 2008 3 commits
  16. 01 Feb, 2008 3 commits
  17. 17 Oct, 2007 1 commit
  18. 12 Oct, 2007 5 commits
  19. 20 Jul, 2007 1 commit
    • Paul Mundt's avatar
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt authored
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      20c2df83
  20. 12 Jul, 2007 1 commit
    • Pete Zaitcev's avatar
      usbmon: Add class for binary interface · ce7cd137
      Pete Zaitcev authored
      Add a class which allows for an easier integration with udev.
      
      This code was originally written by Paolo Abeni, and arrived to my tree
      as a part of big patch to add binary API on December 18. As I understand,
      Paolo always meant the class to be a part of the whole thing. This is his
      udev rule to go along with the patch:
      
      KERNEL=="usbmon[0-9]*", NAME="usbmon%n", MODE="0440",OWNER="root",GROUP="bin"
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      ce7cd137
  21. 08 May, 2007 1 commit
  22. 27 Apr, 2007 2 commits
    • Pete Zaitcev's avatar
      usbmon: bus zero · ecb658d3
      Pete Zaitcev authored
      Add the "bus zero" feature to the usbmon. If a user process specifies bus
      with number zero, it receives events from all buses. This is useful when
      we wish to see initial enumeration when a bus is created, typically after
      a modprobe. Until now, an application had to loop until a new bus could
      be open, then start capturing on it. This procedure was cumbersome and
      could lose initial events. Also, often it's too bothersome to find exactly
      to which bus a specific device is attached.
      
      Paolo Albeni provided the original concept implementation. I added the
      handling of "bus->monitored" flag and generally fixed it up.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ecb658d3
    • Pete Zaitcev's avatar
      usbmon: Extended text API · f1c9e30b
      Pete Zaitcev authored
      This patch adds a new text API, codenamed '1u', which captures more URB
      fields than old '1t' interface did. Also the '1u' text API is compatible
      with the future "bus zero" extension.
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      f1c9e30b
  23. 23 Feb, 2007 1 commit
  24. 07 Feb, 2007 1 commit
    • Pete Zaitcev's avatar
      USB: add binary API to usbmon · 6f23ee1f
      Pete Zaitcev authored
      This patch adds a new, "binary" API in addition to the old, text API usbmon
      had before. The new API allows for less CPU use, and it allows to capture
      all data from a packet where old API only captured 32 bytes at most. There
      are some limitations and conditions to this, e.g. in case someone constructs
      a URB with 1GB of data, it's not likely to be captured, because even the
      huge buffers of the new reader are finite. Nonetheless, I expect this new
      capability to capture all data for all real life scenarios.
      
      The downside is, a special user mode application is required where cat(1)
      worked before. I have sample code at http://people.redhat.com/zaitcev/linux/
      and Paolo Abeni is working on patching libpcap.
      
      This patch was initially written by Paolo and later I tweaked it, and
      we had a little back-and-forth. So this is a jointly authored patch, but
      I am submitting this I am responsible for the bugs.
      Signed-off-by: default avatarPaolo Abeni <paolo.abeni@email.it>
      Signed-off-by: default avatarPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      6f23ee1f
  25. 07 Dec, 2006 2 commits
  26. 27 Sep, 2006 4 commits