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]
Message-ID: <YbBX+cLRhJ5T+hBq@kroah.com>
Date:   Wed, 8 Dec 2021 08:00:09 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Sai Prakash Ranjan <quic_saipraka@...cinc.com>
Cc:     Jiri Slaby <jirislaby@...nel.org>, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, quic_eberman@...cinc.com,
        quic_tsoni@...cinc.com,
        Shanker Donthineni <shankerd@...eaurora.org>,
        Adam Wallis <awallis@...eaurora.org>,
        Timur Tabi <timur@...eaurora.org>,
        Elliot Berman <eberman@...eaurora.org>
Subject: Re: [RESEND PATCHv2] tty: hvc: dcc: Bind driver to core0 for reads
 and writes

On Wed, Dec 08, 2021 at 12:08:47PM +0530, Sai Prakash Ranjan wrote:
> From: Shanker Donthineni <shankerd@...eaurora.org>
> 
> Some debuggers, such as Trace32 from Lauterbach GmbH, do not handle
> reads/writes from/to DCC on secondary cores. Each core has its
> own DCC device registers, so when a core reads or writes from/to DCC,
> it only accesses its own DCC device. Since kernel code can run on
> any core, every time the kernel wants to write to the console, it
> might write to a different DCC.
> 
> In SMP mode, Trace32 creates multiple windows, and each window shows
> the DCC output only from that core's DCC. The result is that console
> output is either lost or scattered across windows.
> 
> Selecting this option will enable code that serializes all console
> input and output to core 0. The DCC driver will create input and
> output FIFOs that all cores will use. Reads and writes from/to DCC
> are handled by a workqueue that runs only core 0.
> 
> Link: https://lore.kernel.org/lkml/1435344756-20901-1-git-send-email-timur@codeaurora.org/
> Signed-off-by: Shanker Donthineni <shankerd@...eaurora.org>
> Acked-by: Adam Wallis <awallis@...eaurora.org>
> Signed-off-by: Timur Tabi <timur@...eaurora.org>
> Signed-off-by: Elliot Berman <eberman@...eaurora.org>
> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@...cinc.com>
> ---
> 
> Resending this v2 since earlier one had a typo in the variable type.
> 
> Changes in v2:
>  * Checkpatch warning fixes.
>  * Use of IS_ENABLED macros instead of ifdefs.
> 
> I also thought of making it depends on !HOTPLUG_CPU since it is broken
> in case core0 is hotplugged off, but apparently HOTPLUG_CPU kconfig
> has weird dependency issues, i.e., gets selected by CONFIG_PM and others.
> So it will be almost like this feature won't be selectable at all if
> I add !HOTPLUG_CPU kconfig dependency. Also HVC_DCC is a debug feature
> where we need Trace32 like tools to access DCC windows in which case
> these shortcomings can be expected since manual intervention is required
> anyways for attaching a core to Trace32, so it won't matter much.

But your code will break on systems when cpu 0 goes away, so this isn't
going to work well at all.  Please make this work for any cpu or handle
the case when the cpu it is running on goes away.

Also, this REALLY looks like you are trying to fix the kernel for a
crazy userspace program.  Why not fix the userspace program instead?
Isn't that easier and then that way it will work for any kernel version?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ