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-prev] [day] [month] [year] [list]
Date:   Tue, 14 Feb 2017 15:20:24 +0800
From:   Lu Baolu <baolu.lu@...ux.intel.com>
To:     Peter Chen <peter.chen@....com>, Peter Chen <hzpeterchen@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v7 5/5] usb: doc: add document for USB3 debug port usage

Hi,

On 02/14/2017 02:13 PM, Peter Chen wrote:
>  
>> On 02/14/2017 11:45 AM, Peter Chen wrote:
>>> On Tue, Feb 14, 2017 at 10:27 AM, Lu Baolu <baolu.lu@...ux.intel.com> wrote:
>>>
>>>> Add Documentation/usb/usb3-debug-port.rst. This document includes the
>>>> user guide for USB3 debug port.
>>>>
>>>> Cc: linux-doc@...r.kernel.org
>>>> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
>>>> ---
>>>>  Documentation/usb/usb3-debug-port.rst | 98
>>>> ++++++++++++++++++++++++++++++
>>>> +++++
>>>>  1 file changed, 98 insertions(+)
>>>>  create mode 100644 Documentation/usb/usb3-debug-port.rst
>>>>
>>>> diff --git a/Documentation/usb/usb3-debug-port.rst
>>>> b/Documentation/usb/usb3-debug-port.rst
>>>> new file mode 100644
>>>> index 0000000..9eddb3a
>>>> --- /dev/null
>>>> +++ b/Documentation/usb/usb3-debug-port.rst
>>>> @@ -0,0 +1,98 @@
>>>> +===============
>>>> +USB3 debug port
>>>> +===============
>>>> +
>>>> +:Author: Lu Baolu <baolu.lu@...ux.intel.com>
>>>> +:Date: January 2017
>>>> +
>>>> +GENERAL
>>>> +=======
>>>> +
>>>> +This is a HOWTO for using USB3 debug port on x86 systems.
>>>> +
>>>> +Before using any kernel debugging functionality based on USB3 debug
>>>> +port, you need to check 1) whether debug port is supported by the
>>>> +xHCI host; 2) which port is used for debugging purposes (normally
>>>> +the first USB3 root port). You must have a USB 3.0 super-speed
>>>> +A-to-A debugging cable to connect the debug target with a debug
>>>> +host. In this document, "debug target" stands for the system under
>>>> +debugging, and "debug host" stands for a stand-alone system that is
>>>> +able to talk to the debugging target through the USB3 debug port.
>>>> +
>>>> +EARLY PRINTK
>>>> +============
>>>> +
>>>> +On the debug target system, you need to customize a debugging kernel
>>>> +with CONFIG_EARLY_PRINTK_USB_XDBC enabled. And, add below kernel
>>>> +boot parameter::
>>>> +
>>>> +       "earlyprintk=xdbc"
>>>> +
>>>> +If there are multiple xHCI controllers in the system, you can append
>>>> +a host contoller index to this kernel parameter. This index starts
>>>> +from 0.
>>>> +
>>>> +If you are going to use the "keep" option defined by the early
>>>> +printk framework to keep the boot console alive after early boot,
>>>> +you'd better add below kernel boot parameter::
>>>> +
>>>> +       "usbcore.autosuspend=-1"
>>>> +
>>>> +On the debug host side, you don't need to customize the kernel, but
>>>> +you'd better disable usb subsystem runtime power management by
>>>> +adding below kernel boot parameter::
>>>> +
>>>> +       "usbcore.autosuspend=-1"
>>>> +
>>>>
>>> Just curious, why autosuspend needs to be disabled for this function?
>> This implementation doesn't support suspend/resume yet.
>  
> Why host side needs to disable it too?

If host side runtime suspend/resume is enabled, it might ask the
debug device to suspend. This will cause the debug device dead.

The suspend/resume of the debug device depends on xhci driver.
I will make it happen in separated patches with more tests. It's in
my TODO list.

Best regards,
Lu Baolu

Powered by blists - more mailing lists