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: <2026011500-safehouse-alphabet-3056@gregkh>
Date: Thu, 15 Jan 2026 07:37:38 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
Cc: Prashanth K <prashanth.k@....qualcomm.com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 3/3] usb: dwc3: Log dwc3 address in traces

On Wed, Jan 14, 2026 at 11:54:03PM +0000, Thinh Nguyen wrote:
> On Wed, Jan 14, 2026, Thinh Nguyen wrote:
> > On Wed, Jan 14, 2026, Greg Kroah-Hartman wrote:
> > > On Wed, Jan 14, 2026 at 03:37:48PM +0530, Prashanth K wrote:
> > > > + * @address: Cached lower 32-bit base address to be used for logging.
> > > 
> > > Why are 32bits enough / ok?  Why not use the full 64 that you really
> > > have?  What happens if you have 2 devices with just the upper 32 bits
> > > different?
> > > 
> > > This is a resource value, so why not use the proper type for it?
> > > 
> > 
> > This is only intented to be used for logging, so I suggested to use u32.
> > I want to avoid treating this struct member as a phys_addr_t where it
> > may be misused.
> > 
> > As for the reason to capture only the lower 32-bit, it's just base on
> > what I've seen so far. That I have not seen designs where the 2 or more
> > instances are placed that far apart and share the same lower 32-bit.
> > It's a bit nicer to shorten the address print at the start of a
> > tracepoint. But if it's insufficient, there's no problem with using
> > 64-bit.
> > 
> 
> Or we can just remove this and print the address from
> dwc->xhci_resources[0].start.

I thought I asked for that a few revisions ago :)

I'd prefer that, instead of saving off a value that you can look up if
you need it.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ