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: <233974fc-f05c-4028-836e-581def599489@kernel.org>
Date: Thu, 21 Nov 2024 11:45:07 +0000
From: Quentin Monnet <qmo@...nel.org>
To: liujing <liujing@...s.chinamobile.com>
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
 martin.lau@...ux.dev, eddyz87@...il.com, song@...nel.org,
 yonghong.song@...ux.dev, john.fastabend@...il.com, kpsingh@...nel.org,
 sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, bpf@...r.kernel.org,
 linux-kernel@...r.kernel.org, liujing <liujing_yewu@...s.chinamobile.com>
Subject: Re: [PATCH] bpftool: Fix wrong format output

2024-11-21 11:42 UTC+0000 ~ Quentin Monnet <qmo@...nel.org>
> 2024-11-21 16:47 UTC+0800 ~ liujing <liujing@...s.chinamobile.com>
>> From: liujing <liujing_yewu@...s.chinamobile.com>
>>
>> %d in format string requires 'int' but the argument type
>> of pf is 'unsigned int'.
>>
>> Signed-off-by: liujing <liujing@...s.chinamobile.com>
>>
>> diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c
>> index 5cd503b763d7..5bc442d93456 100644
>> --- a/tools/bpf/bpftool/link.c
>> +++ b/tools/bpf/bpftool/link.c
>> @@ -699,7 +699,7 @@ void netfilter_dump_plain(const struct bpf_link_info *info)
>>  	if (pfname)
>>  		printf("\n\t%s", pfname);
>>  	else
>> -		printf("\n\tpf: %d", pf);
>> +		printf("\n\tpf: %u", pf);
>>  
>>  	if (hookname)
>>  		printf(" %s", hookname);
> 
> 
> Thanks, but while at it can you also fix the format specifier for the
> other two prints of "lines" in the function (via "p_err()"), please?

Apologies, I got confused between your two patches when replying. Please
disregard the above for this patch, it looks good as it is.

Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ