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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z08xIyc7OcRoEE-C@LQ3V64L9R2>
Date: Tue, 3 Dec 2024 08:26:11 -0800
From: Joe Damato <jdamato@...tly.com>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, edumazet@...gle.com,
	kuba@...nel.org, mkarsten@...terloo.ca,
	"David S. Miller" <davem@...emloft.net>,
	Simon Horman <horms@...nel.org>, Shuah Khan <shuah@...nel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

On Mon, Dec 02, 2024 at 09:14:58PM -0800, Stanislav Fomichev wrote:
> On 12/03, Joe Damato wrote:
> > Fix various integer type conversions by using strtoull and a temporary
> > variable which is bounds checked before being casted into the
> > appropriate cfg_* variable for use by the test program.
> > 
> > While here, free the strdup'd cfg string for overall hygenie.
> 
> Thank you for fixing this! I also saw them this morning after a net-next
> pull and was about to post... I also see the following (LLVM=1):
> 
> busy_poller.c:237:6: warning: variable 'napi_id' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>   237 |         if (napi_list->obj._present.id)
>       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
> busy_poller.c:243:38: note: uninitialized use occurs here
>   243 |         netdev_napi_set_req_set_id(set_req, napi_id);
>       |                                             ^~~~~~~
> busy_poller.c:237:2: note: remove the 'if' if its condition is always true
>   237 |         if (napi_list->obj._present.id)
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   238 |                 napi_id = napi_list->obj.id;
>       |                                            ~
>   239 |         else
>       |         ~~~~
>   240 |                 error(1, 0, "napi ID not present?");
>       |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> busy_poller.c:226:18: note: initialize the variable 'napi_id' to silence this warning
>   226 |         uint32_t napi_id;
>       |                         ^
>       |                          = 0
> 1 warning generated.
> 
> Presumably the compiler can't connect that fact that (!preset.id) ->
> error. So maybe initialize napi_id to 0 to suppress it as well?

Thanks for the report! Can I ask what compiler and version you are
using so that I can test before reposting?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ