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-next>] [day] [month] [year] [list]
Message-ID: <20090820173427.GA8517@lenovo>
Date:	Thu, 20 Aug 2009 21:34:28 +0400
From:	Cyrill Gorcunov <gorcunov@...nvz.org>
To:	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH -tip] x86: smp_scan_config - use signed long as scan area
	size

Unsigned value potentially could be overlapped
if length parameter is that: length % 16 != 0.

This is not a problem at moment since all values
we pass now are 16 divisible (0x400 and 0x10000).

Though there is no need unsigned value anyway.
Max range pointed out by MP specification is
in kilobytes so plain "signed long" is enough.

This allow us to be on a safe side.

Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
---

(I doubt if we ever will need to scan 1G of physical
 memory with 16 byte step at booting procedure 'xcept
 memtest case)

Please review. Not sure if the patch is that worth
but anyway :)

 arch/x86/kernel/mpparse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.git/arch/x86/kernel/mpparse.c
=====================================================================
--- linux-2.6.git.orig/arch/x86/kernel/mpparse.c
+++ linux-2.6.git/arch/x86/kernel/mpparse.c
@@ -705,7 +705,7 @@ static void __init smp_reserve_bootmem(s
 #endif
 }
 
-static int __init smp_scan_config(unsigned long base, unsigned long length,
+static int __init smp_scan_config(unsigned long base, long length,
 				  unsigned reserve)
 {
 	unsigned int *bp = phys_to_virt(base);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ