lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1502093269-15978-1-git-send-email-baolu.lu@linux.intel.com>
Date:   Mon,  7 Aug 2017 16:07:45 +0800
From:   Lu Baolu <baolu.lu@...ux.intel.com>
To:     Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Lu Baolu <baolu.lu@...ux.intel.com>
Subject: [PATCH v2 0/4] usb: xhci: Add debug capability support in xhci

Hi,

This series is for xHCI debug capability (spec section 7.6.8) support
in the xHCI driver.

xHCI compatible USB host controllers(i.e. super-speed USB3 controllers)
can be implemented with the Debug Capability(DbC). It presents a debug
device which is fully compliant with the USB framework and provides the
equivalent of a very high performance full-duplex serial link. The debug
capability operation model and registers interface are defined in 7.6.8
of the xHCI specification, revision 1.1.

The DbC debug device shares a root port with the xHCI host. By default,
the debug capability is disabled and the root port is assigned to xHCI.
When the DbC is enabled, the root port will be assigned to the DbC debug
device, and the xHCI sees nothing on this port. This implementation uses
a sysfs node named <dbc> under the xHCI device to manage the enabling
and disabling of the debug capability.

When the debug capability is enabled, it will present a debug device
through the debug port. This debug device is fully compliant with the
USB3 framework, and it can be enumerated by a debug host on the other
end of the USB link. As soon as the debug device is configured, a TTY
serial device named /dev/ttyGSn will be created.

One use of this link is running a login service on the debug target.
Hence it can be remote accessed by a debug host. Another use case can
probably be found in servers. It provides a peer-to-peer USB link
between two host-only machines. This provides a reasonable out-of-band
communication method between two servers.

Best regards,
Lu Baolu

---
Change log:
v1->v2:
  - Add a new patch to move u_serial.c from drivers/usb/gadget/function
    to drivers/usb/common/ and move u_serial.h to include/linux/usb/.

Lu Baolu (4):
  usb: xhci: Make some static functions global
  usb: common: Move u_serial from gadget/function to usb/common
  usb: xhci: Add DbC support in xHCI driver
  usb: doc: Update document for USB3 debug port usage

 .../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd     |   25 +
 Documentation/driver-api/usb/usb3-debug-port.rst   |   68 +
 drivers/usb/Kconfig                                |    3 +
 drivers/usb/Makefile                               |    3 +-
 drivers/usb/common/Makefile                        |    1 +
 drivers/usb/common/u_serial.c                      | 1604 +++++++++++++++++++
 drivers/usb/gadget/Kconfig                         |    3 -
 drivers/usb/gadget/function/Makefile               |    1 -
 drivers/usb/gadget/function/f_acm.c                |    4 +-
 drivers/usb/gadget/function/f_obex.c               |    4 +-
 drivers/usb/gadget/function/f_serial.c             |    3 +-
 drivers/usb/gadget/function/u_serial.c             | 1606 --------------------
 drivers/usb/gadget/function/u_serial.h             |   71 -
 drivers/usb/gadget/legacy/acm_ms.c                 |    3 +-
 drivers/usb/gadget/legacy/cdc2.c                   |    2 +-
 drivers/usb/gadget/legacy/dbgp.c                   |    3 +-
 drivers/usb/gadget/legacy/multi.c                  |    2 +-
 drivers/usb/gadget/legacy/nokia.c                  |    2 +-
 drivers/usb/gadget/legacy/serial.c                 |    3 +-
 drivers/usb/host/Kconfig                           |    9 +
 drivers/usb/host/Makefile                          |    5 +
 drivers/usb/host/xhci-dbgcap.c                     | 1100 ++++++++++++++
 drivers/usb/host/xhci-dbgcap.h                     |  194 +++
 drivers/usb/host/xhci-mem.c                        |   94 +-
 drivers/usb/host/xhci-ring.c                       |    4 +-
 drivers/usb/host/xhci-trace.h                      |   65 +
 drivers/usb/host/xhci.c                            |   10 +
 drivers/usb/host/xhci.h                            |   17 +-
 include/linux/usb/gadget.h                         |   52 +
 include/linux/usb/u_serial.h                       |   71 +
 30 files changed, 3290 insertions(+), 1742 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-pci-drivers-xhci_hcd
 create mode 100644 drivers/usb/common/u_serial.c
 delete mode 100644 drivers/usb/gadget/function/u_serial.c
 delete mode 100644 drivers/usb/gadget/function/u_serial.h
 create mode 100644 drivers/usb/host/xhci-dbgcap.c
 create mode 100644 drivers/usb/host/xhci-dbgcap.h
 create mode 100644 include/linux/usb/u_serial.h

-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ