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: <341f69ce-2af2-4c13-8144-146f1aa9fb07@linuxfoundation.org>
Date: Fri, 28 Mar 2025 17:14:00 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: David Binderman <dcb314@...mail.com>,
 "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
 "shuah@...nel.org" <shuah@...nel.org>,
 "linux-mm@...ck.org" <linux-mm@...ck.org>,
 "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: bug report for
 linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c

On 3/26/25 13:25, David Binderman wrote:
> Hello there,
> 
> Static analyser cppcheck says:
> 
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:1061:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:1510:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:1523:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:247:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:435:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
>> linux-6.14/tools/testing/selftests/mm/pagemap_ioctl.c:490:11: style: int result is assigned to long long variable. If the variable is long long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
> 
> The source code of the first one is
> 
>      mem_size = 10 * page_size;
> 
> Maybe better code:
> 
>      mem_size = 10ULL * page_size;
> 
> Regards
> 
> David Binderman
> 

Can you send a patch for us to review?

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ