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>] [day] [month] [year] [list]
Message-ID:
 <VI1PR02MB3952964EF347629B2686A36E9C99A@VI1PR02MB3952.eurprd02.prod.outlook.com>
Date: Thu, 5 Feb 2026 09:21:17 +0000
From: David Binderman <dcb314@...mail.com>
To: "graf@...zon.com" <graf@...zon.com>, "rppt@...nel.org" <rppt@...nel.org>,
	"pasha.tatashin@...een.com" <pasha.tatashin@...een.com>,
	"pratyush@...nel.org" <pratyush@...nel.org>, "kexec@...ts.infradead.org"
	<kexec@...ts.infradead.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>, LKML
	<linux-kernel@...r.kernel.org>
Subject: linux-6.19-rc8/kernel/liveupdate/kexec_handover.c:1089: Possible
 32/64 bit mixup ?

Hello there,

Source code analyser cppcheck says:

linux-6.19-rc8/kernel/liveupdate/kexec_handover.c:1089:15: 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

    contig_pages = (1 << order);

I admit the error message is hard to understand, but AFAIK
if local variable order remains under 30 or so, then there is no problem.

However, if it goes above 32, then there will be loss of data. 
Expression 1 << order is type int.

Suggest add some code or comment to document the expected range
of local variable order. If it ever goes above 32, suggest new code

    contig_pages = 1UL << order;

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ