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: <20090617150419.e406a69a.sfr@canb.auug.org.au>
Date:	Wed, 17 Jun 2009 15:04:19 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Avi Kivity <avi@...ranet.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	<linuxppc-dev@...abs.org>
Subject: linux-next: kvm/powerpc tree build failure

Hi Avi, Ben,

Today's linux-next build (powerpc ppc44x_defconfig) failed like this:

cc1: warnings being treated as errors
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1178: error: integer overflow in expression

Probably caused by commit ac04527f7947020c5890090b2ac87af4e98d977e ("KVM:
Disable large pages on misaligned memory slots"). The build fails because
arch/powerpc is now being built (mostly) with -Werror.

arch/powerpc/include/asm/kvm_host.h:#define KVM_PAGES_PER_HPAGE (1<<31)

this needs to be (1UL << 31) or ((unsigned int)1 << 31).

I applied the following patch for today.

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Wed, 17 Jun 2009 14:57:29 +1000
Subject: [PATCH] kvm/powerpc: make 32 bit constant unsigned long

KVM_PAGES_PER_HPAGE needs to be unsigned long since its value is 2^31.

Eliminates this compiler warning:

arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1178: error: integer overflow in expression

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 arch/powerpc/include/asm/kvm_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 3625424..d4caa61 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -34,7 +34,7 @@
 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1
 
 /* We don't currently support large pages. */
-#define KVM_PAGES_PER_HPAGE (1<<31)
+#define KVM_PAGES_PER_HPAGE (1UL << 31)
 
 struct kvm;
 struct kvm_run;
-- 
1.6.3.1

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
--
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