From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7626D3EC2E0; Thu, 7 May 2026 11:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778153897; cv=none; b=TJPjHGsFPnn0TyUiGaY7tCQkkf7BQqghVRYz5/uAJtICxXQOKij7dMvI7oNzEr2ikighLNJ1eKzm/5EPT/VLMcaBlzrrWSCC8qpI4BqTmr4tzeGhXAhbjN6v3zT5Vvh6EAo7mTzJYc/fEEOe+isbDh6eQWSGRLnYR2RQmzla2qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778153897; c=relaxed/simple; bh=JQmsOPqiQvG2uQuddF/SQF9vXsPHXdDJ4NGB35X+Zio=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=FJPpWRJvqOGReU1P0t5xWb+drIMKqur6bEgZC9tUdcL9uTKK8hfy0bSfmz9rfWWuMHAUEBC0RXBJ8AhMVYTciGuaig9RDpHoXVvHz8BaLYlN1aUpfXIgI2c6/1h8K0mHvwxBFEkqkwvfaYx0BFJMVxt98BWStYtlj+ZINsZJcXk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=permerror header.from=sipsolutions.net; spf=none smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Z+Zo3cV1; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=permerror header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Z+Zo3cV1" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=JQmsOPqiQvG2uQuddF/SQF9vXsPHXdDJ4NGB35X+Zio=; t=1778153894; x=1779363494; b=Z+Zo3cV1/23fwv4hXjUTcPb5qp3j7+up7IaXz94dRmoFqkb aE1wsf+w8ORkVoq1R3tjcf8LfAulWpV0Qp8eTko3bw4sDDbuosSMExwTh+9zhrcfLmaPvsuTwo4ec ErFVSAOTM+2/b4Nx1DhAHm5DM2fMRVY00mFUD9Hs+2CDdZEb6PQqYvEDPhQFFr4ctpcy4Tcju3Xsm zMrXftb+pfBA+8CsvxKtRpMeLrFsmk0wf4SlXR/lAJWpp+71XvZR00UsyUrnPg8/oUIA3GEHkvp7r 5JJ4dmQaj3mnol49tCwzoht5XOZmJ0Adh80DVdDKM9zOXIpD7ldBF82OGiKghmUA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.98.2) (envelope-from ) id 1wKwcG-00000003DIr-0Uxu; Thu, 07 May 2026 13:10:04 +0200 Message-ID: Subject: Re: [PATCH v3 0/3] Add str_alloc_free() helper From: Johannes Berg To: Jiazi Li , Kees Cook , Andy Shevchenko , Ping-Ke Shih , Julia Lawall , Nicolas Palix Cc: linux-hardening@vger.kernel.org, linux-wireless@vger.kernel.org Date: Thu, 07 May 2026 13:10:03 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Thu, 2026-05-07 at 19:03 +0800, Jiazi Li wrote: > Currently finds 4 locations: > ./drivers/net/wireless/realtek/rtw89/fw.c:2557:7-12: opportunity for str_= alloc_free(valid) > ./drivers/net/wireless/realtek/rtw89/fw.c:2693:7-12: opportunity for str_= alloc_free(valid) > ./drivers/android/tests/binder_alloc_kunit.c:196:6-21: opportunity for st= r_alloc_free(alloc -> pages [ i ]) > ./mm/slub.c:1634:3-8: opportunity for str_alloc_free(alloc) It's what, three characters shorter for four users each? Is there really much point? Reading just the name also is really confusing - yes it lines up with str_assert_deassert, but "alloc_free" really doesn't seem very obvious - why would you alloc and free a string in one function call? johannes