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: <8acb6a32-bc4a-4f9f-adb2-f8b20dd0d5c9@kernel.org>
Date: Tue, 2 Dec 2025 23:30:41 +0100
From: Vincent Mailhol <mailhol@...nel.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, Marc Kleine-Budde <mkl@...gutronix.de>,
 Oliver Hartkopp <socketcan@...tkopp.net>, David Ahern <dsahern@...nel.org>,
 Rakuram Eswaran <rakuram.e96@...il.com>,
 Stéphane Grosjean <stephane.grosjean@...e.fr>,
 linux-kernel@...r.kernel.org, linux-can@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2 5/7] iplink_can: add initial CAN XL
 interface

On 02/12/2025 at 01:38, Stephen Hemminger wrote:
> On Mon, 01 Dec 2025 23:55:13 +0100
> Vincent Mailhol <mailhol@...nel.org> wrote:
> 
>>  
>> -static void can_print_tdc_opt(struct rtattr *tdc_attr)
>> +static void can_print_tdc_opt(struct rtattr *tdc_attr, bool is_xl)
>>  {
>>  	struct rtattr *tb[IFLA_CAN_TDC_MAX + 1];
>>  
>>  	parse_rtattr_nested(tb, IFLA_CAN_TDC_MAX, tdc_attr);
>>  	if (tb[IFLA_CAN_TDC_TDCV] || tb[IFLA_CAN_TDC_TDCO] ||
>>  	    tb[IFLA_CAN_TDC_TDCF]) {
>> -		open_json_object("tdc");
>> +		const char *tdc = is_xl ? "xtdc" : "tdc";
>> +
>> +		open_json_object(tdc);
>>  		can_print_nl_indent();
>>  		if (tb[IFLA_CAN_TDC_TDCV]) {
>> +			const char *tdcv_fmt = is_xl ? " xtdcv %u" : " tdcv %u";
> 
> Having a format string as variable can break (future) format checking and some compiler flags.

Ack. I now see that this would raise some -Wformat-nonliteral warnings. I was
not aware of that flag before reading your comment. This will be addressed in v3.


Yours sincerely,
Vincent Mailhol


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ