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: <49dc22ee-ad72-4c01-bab9-37f405e947d6@suse.com>
Date: Tue, 15 Apr 2025 08:55:38 +0200
From: Jürgen Groß <jgross@...e.com>
To: David Binderman <dcb314@...mail.com>,
 "sstabellini@...nel.org" <sstabellini@...nel.org>,
 "oleksandr_tyshchenko@...m.com" <oleksandr_tyshchenko@...m.com>,
 "xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-6.15-rc2/drivers/xen/balloon.c:346: Possible int/long mixup

On 14.04.25 19:57, David Binderman wrote:
> Hello there,
> 
> Static analyser cppcheck says:
> 
> linux-6.15-rc2/drivers/xen/balloon.c:346:24: style: int result is assigned to long variable. If the variable is long to avoid loss of information, then you have loss of information. [truncLongCastAssignment]
> 
> Source code is
> 
>      unsigned long i, size = (1 << order);
> 
> Maybe better code:
> 
>      unsigned long i, size = (1UL << order);
> 

While I agree this would be better, there is no real failure possible
here. For this to cause problems you'd need to hotplug 16TB of memory
in one single block.

Nevertheless thanks for the notice.


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ