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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 31 May 2017 11:38:51 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Mathias Nyman <mathias.nyman@...ux.intel.com>, tglx@...utronix.de,
        peterz@...radead.org, linux-usb@...r.kernel.org, x86@...nel.org,
        linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
        Michal Kubecek <mkubecek@...e.cz>
Subject: Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability

On 05/31/2017 05:27 AM, Lu Baolu wrote:
> Hi,
> 
> On 05/30/2017 09:46 PM, Vlastimil Babka wrote:
>> On 03/21/2017 09:01 AM, Lu Baolu wrote:
>>> XHCI debug capability (DbC) is an optional but standalone
>>> functionality provided by an xHCI host controller. Software
>>> learns this capability by walking through the extended
>>> capability list of the host. XHCI specification describes
>>> DbC in the section 7.6.
>>>
>>> This patch introduces the code to probe and initialize the
>>> debug capability hardware during early boot. With hardware
>>> initialized, the debug target (system on which this code is
>>> running) will present a debug device through the debug port
>>> (normally the first USB3 port). The debug device is fully
>>> compliant with the USB framework and provides the equivalent
>>> of a very high performance (USB3) full-duplex serial link
>>> between the debug host and target. The DbC functionality is
>>> independent of the xHCI host. There isn't any precondition
>>> from the xHCI host side for the DbC to work.
>>>
>>> One use for this feature is kernel debugging, for example
>>> when your machine crashes very early before the regular
>>> console code is initialized. Other uses include simpler,
>>> lockless logging instead of a full-blown printk console
>>> driver and klogd.
>>>
>>> Cc: Ingo Molnar <mingo@...hat.com>
>>> Cc: Mathias Nyman <mathias.nyman@...ux.intel.com>
>>> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
>> ...
>>
>>> +
>>> +#define XDBC_TRACE
>>> +#ifdef XDBC_TRACE
>>> +#define	xdbc_trace	trace_printk
>> Did you forget to remove the #define XDBC_TRACE?
>>
>> Enabling this driver brings the "trace_printk() being used. Allocating
>> extra memory. This means that this is a DEBUG kernel and it is unsafe
>> for production use." message in 4.12-rcX dmesg.
> 
> This feature is only for a DEBUG kernel, should not be enabled for
> any production kernel. This was the reason I enabled trace_printk()
> by default.

Hmm, but it seems we generally enable all these early printk
features/drivers in our distro kernels. They are not active without a
early_printk=X bootparam anyway, right? It's much more convenient to
e.g. just tell customer to change a param when debugging something than
to install a debug kernel. So I wouldn't agree that only a DEBUG kernel
should have this compiled in.

Thanks,
Vlastimil

> Best regards,
> Lu Baolu
> 
>> Thanks,
>> Vlastimil
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ