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]
Message-ID: <cf4f7b915a2777cbf447936c1b13d30b8a1bd51c.camel@nvidia.com>
Date: Thu, 13 Feb 2025 12:28:04 +0000
From: Kartik Rajput <kkartik@...dia.com>
To: "andriy.shevchenko@...ux.intel.com" <andriy.shevchenko@...ux.intel.com>
CC: Jon Hunter <jonathanh@...dia.com>, "robh@...nel.org" <robh@...nel.org>,
	"robert.marko@...tura.hr" <robert.marko@...tura.hr>, "arnd@...nel.org"
	<arnd@...nel.org>, "thierry.reding@...il.com" <thierry.reding@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>, "geert+renesas@...der.be"
	<geert+renesas@...der.be>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "jirislaby@...nel.org" <jirislaby@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "hvilleneuve@...onoff.com"
	<hvilleneuve@...onoff.com>, "schnelle@...ux.ibm.com"
	<schnelle@...ux.ibm.com>, "gregkh@...uxfoundation.org"
	<gregkh@...uxfoundation.org>, "linux-serial@...r.kernel.org"
	<linux-serial@...r.kernel.org>, "linux-tegra@...r.kernel.org"
	<linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] serial: tegra-utc: Add driver for Tegra UART Trace
 Controller (UTC)

On Thu, 2025-02-13 at 12:57 +0200, andriy.shevchenko@...ux.intel.com
wrote:
> External email: Use caution opening links or attachments
> 
> 
> On Thu, Feb 13, 2025 at 10:11:36AM +0000, Kartik Rajput wrote:
> > On Thu, 2025-02-13 at 11:55 +0200,
> > andriy.shevchenko@...ux.intel.com
> > wrote:
> > > On Thu, Feb 13, 2025 at 09:05:36AM +0000, Kartik Rajput wrote:
> > > > On Wed, 2025-02-12 at 17:09 +0200, Andy Shevchenko wrote:
> > > > > On Wed, Feb 12, 2025 at 04:11:32PM +0530, Kartik Rajput
> > > > > wrote:
> 
> ...
> 
> > > > > > +     for (i = 0; i < len; i++) {
> > > > > > +             if (!nbcon_enter_unsafe(wctxt))
> > > > > > +                     break;
> > > > > > +
> > > > > > +             read_poll_timeout_atomic(tegra_utc_tx_readl,
> > > > > > val,
> > > > > > !(val & TEGRA_UTC_FIFO_FULL),
> > > > > > +                                      0, USEC_PER_SEC,
> > > > > > false,
> > > > > > tup,
> > > > > > TEGRA_UTC_FIFO_STATUS);
> > > > > 
> > > > > No error check?
> > > > 
> > > > I'm not sure about this. The case where the TX FIFO doesn't
> > > > clear
> > > > up,
> > > > even after polling for 1 second, is highly unlikely, especially
> > > > since
> > > > there's no flow control involved here. Even if that did happen,
> > > > writing
> > > > to the TX FIFO should just result in an overflow, which is
> > > > probably
> > > > acceptable in this scenario.
> > > 
> > > Perhaps a warning (debug?) message in such a case?
> > 
> > I would prefer avoiding any prints in this function, as we are
> > writing
> > debug messages to the UART HW here.
> 
> Not every printf() goes to UART, but to your point the NBCON should
> solve that
> issue to some extent. Of course, if the HW in a broken
> (unrecoverable) state,
> nothing won't help.
> 

I agree, but we still risk flooding up the ring buffer if we add debug
message here.

> > > > > > +             uart_console_write(&tup->port, wctxt->outbuf
> > > > > > + i,
> > > > > > 1,
> > > > > > tegra_utc_console_putchar);
> > > > > > +
> > > > > > +             if (!nbcon_exit_unsafe(wctxt))
> > > > > > +                     break;
> > > > > > +     }
> 
> --
> With Best Regards,
> Andy Shevchenko
> 
> 

Thanks & Regards,
Kartik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ