🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5507

Re: [PATCH iproute 2/3] rdma: don't build printf formats out of keys

#5507
From: Leon Romanovsky
Date: Tue, 20 Oct 2026 13:10
12 lines
8039 bytes
On Mon, Oct 19, 2026 at 01:03:03PM -0700, Stephen Hemminger wrote:
> print_key(), res_print_u32(), res_print_u64(), print_driver_string() and
> print_ipaddr() passed the attribute key as both the json key and the
> printf format, so a '%' in a kernel-supplied driver or hwcounter key was
> taken as a conversion. Pass the key as a string argument with a literal
> format; output is unchanged.

I'm not aware of any real firmware that sets `%` there. However, why not?

Thanks,
Reviewed-by: Leon Romanovsky <leon@kernel.org>
Technical Details
Message-ID: <20261020131003.GM64621@unreal>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349296-linux-kernel-netdev=dewy.ru
References: <20261019200623.816470-1-stephen@networkplumber.org> <20261019200623.816470-3-stephen@networkplumber.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349296-linux-kernel-netdev=dewy.ru
From: leon@kernel.org (Leon Romanovsky)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH iproute 2/3] rdma: don't build printf formats out of keys
Date: Tue, 20 Oct 2026 16:10:03 +0300
Organization: Usenet Network
Message-ID: <20261020131003.GM64621@unreal>
References: <20261019200623.816470-1-stephen@networkplumber.org>
 <20261019200623.816470-3-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3859149"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Nm6bFPSTcfF55vscjJuuyBQJPL8= sha256:NPn5TxDqb+ZUvjlcrOpMbFW2IejpWk3HvBOIvAc4CNY=
	sha1:UkcyiHfD21J4qjfSKvZe3uNRYZ0= sha256:6wNyagjvIiydMkLyoY7SC4Hn1ddKNfvi5gLRdkHHTNU=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 1771D110D01; Tue, 20 Oct 2026 16:22:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.729
X-Spam-Status: No, score=-3.729 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id baiJCdDfIECH;
	Tue, 20 Oct 2026 16:22:04 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349296-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 3CF02110CFA; Tue, 20 Oct 2026 16:21:55 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id E6EA980FEC; Tue, 20 Oct 2026 13:10:22 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792501809;
	b=f9MRcACAsEfC9FucfL/G78n/X89cKmVsnxPyRnFtfwSSaUbwfzw9SILj0RoSEOMO0IET
	 x0p94bdlVPIMGCwpL1/hRRsJVDLR+aT/QnhbWEPHb7XoKOHxlZUqwHCOs//ekb/0wQsCS
	 w8eEspd60XIe3TctSgHM5rKlopEeOkMhLtAhSNM+xn6zKDoogZL5s2n2dRJZBXIaJ3cBB
	 8qbJJgaecQ9yk5dGPD12K1X0JpJaDdw76xswCKnDvUk32HhfYD1U+CapTw3/Y+EJrzK9u
	 pVOykgaShwPIhnrSckFxmnoj4GbjgIwJdahYJ6H3YvBuesg+vSmNgiE/SfR8aEewBfw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792501809;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=MJnzoeGDJGlYFhnUg3KqAZEf4kJrQ0yTrNTuF4zJyDA=;
	b=woACGKkvO6Q0z7JDS+ce7Uq0IqSb/Z4XKyonyeclP6rz3x7sC3/n8HyoRXHSSaZIUA7v
	 8l58q4Dagjmj/MTKgc/ixh+SpTbFHJcRIEmYXqVU45gVZmZgIef1NYeJkceFz4Usg0JIs
	 jp2shADHAqX3iONhfGf0ZDGeNpx1xTLm/ntU+rlOd6SKOl8kbCVFKl7BGYWqTVVkhYiSz
	 5fRJweD+jSIvrzOFbyKznnypwcPo46dT3NTujBmtjE76gueLh1VxRlY/NMn1mK2lHxhU+
	 KMCznIL9QhIPFz6612Z76p9e1N6q14g7T9JfTQL3iyKizt9zU8UxOehbiGCRJcvv8tw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TWKxgIPL;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id B508760A2606;
	Tue, 20 Oct 2026 13:10:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TWKxgIPL
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792501808;
	b=En6ALBgk8/VCwF0DjCMWNkB1dUSSQPVWKuKh2tjHrwSnpHWBeqRjlJC0V2aB6qrdTykr
	 NFg1+K8A/7UXacEHdRZhVLZ+kZ7GI5XaFgmdyknwI0vnxT6xuIcMsjv4PG2wAWHywph0X
	 ZHAmKuSXWQesfgV8rMPGJLpX7srTSuGSI53+po71SD2gGicxp518MnP0cZe1xweG2/QOK
	 rq2I7eqcXovQD+ZQW84+sJq64tPahRM2jtskg4hZt4DcaPm97I06co01LcibwxyF14aY3
	 zJ+dzERHqId0QADv0xbhdbDSD2Tum0tPfu4mvu4MxOeyfpIH1tO7GsVm4oMYmcBJmNA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792501808;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=MJnzoeGDJGlYFhnUg3KqAZEf4kJrQ0yTrNTuF4zJyDA=;
	b=0b/BR8QeVzYDDAlopk5Y1eHkLzWjNbRbor1TfmIRS2MTRm+4HNrkVZ5GAiuIELrSH0mB
	 LB4dYJb2ibBfMaeLQiHqoMwZ7GQFU0Y7t7SG+4egNF59Ep16XK1kRGIG4uygRi+DqIdmu
	 3vtSvRT9swSM79Hy77LOpsXTo8fHHVYlTjCkQ2VHC0F/yZAa6pT9po/08VVLZQNfzHwlx
	 BRUValsazXr0Dna1UVS5pG9BXzUzSejaq2XHrIJETtwcon1w+zsVWywm3yvOBzxNW8peW
	 AfJAHr7/w092te6vejcm+9jug+PYZILjBzOqRx1X8P8fIGWbkcXNSiHzhVSb+ZWm8Qw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TWKxgIPL;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97AB4606A33F
	for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 13:10:08 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB0391F000C4;
	Tue, 20 Oct 2026 13:10:07 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792501808;
	bh=MJnzoeGDJGlYFhnUg3KqAZEf4kJrQ0yTrNTuF4zJyDA=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=TWKxgIPLJ9LqYrCWrojpTigzIZC0QvcpwMnXvOAHRndMDSyMQ6o9YIelmVs1WdZot
	 Menq4HSdUVM8iNAw7piS8paMXEXazB6vFZ/Qsl7OfLLdDBm1J18ucIFBHSQ5daAspW
	 4JnMFNBpYVv0UYtoeUUyOc5oIS4B9AUxdPfBwaWRclis9Y1uS/Rja4i3DaRJa5iAr2
	 7r1ZznJdl+fx9D2xH1oqt7hLbaWaqA49U8/hyoYh4gmgUw0yDTDkCHu4a3ghOBNfPl
	 7sLuPwMLC6tJ3PDl5lGrOHnPngRH4rHcvsxm/9RtU1B2CRdB+J5T5fBproLnCzkeKO
	 ZDhn5puKKnOyg==
X-Cc: netdev@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261019200623.816470-3-stephen@networkplumber.org>