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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <704b69a6af32e0d89a6d88051c12f29fdadfa638.camel@nvidia.com>
Date: Wed, 4 Jun 2025 22:01:35 +0000
From: Timur Tabi <ttabi@...dia.com>
To: "christophe.jaillet@...adoo.fr" <christophe.jaillet@...adoo.fr>,
	"philip.li@...el.com" <philip.li@...el.com>, "simona@...ll.ch"
	<simona@...ll.ch>, "lyude@...hat.com" <lyude@...hat.com>,
	"pierre.morrow@...e.fr" <pierre.morrow@...e.fr>, "airlied@...il.com"
	<airlied@...il.com>, "jacob.e.keller@...el.com" <jacob.e.keller@...el.com>,
	"dakr@...nel.org" <dakr@...nel.org>, Ben Skeggs <bskeggs@...dia.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/nouveau/bl: Use kasprintf for interface name

On Wed, 2025-06-04 at 14:03 -0700, Jacob Keller wrote:
> This could also be fixed by simply increasing BL_NAME_SIZE to 24, making it
> large enough to fit any size integer into its format string, or by checking
> the return value of snprintf.

I think this would be a better approach.  backlist_name[24] is still small enough to fit on the
stack with ease, and it would eliminate the alloc/free churn.  kasprintf() should be reserved for
long-term or larger allocations, IMHO.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ