x86, boot: fix warning on 32-bit builds
PATCH 1/1 x86, boot: fix warning on 32-bit builds
Building 32-bit threw a warning on kASLR enabled builds:
arch/x86/boot/compressed/aslr.c: In function ‘mem_avoid_overlap’:arch/x86/boot/compressed/aslr.c:198:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
avoid.start = (u64)ptr;
^This fixes the warning; unsigned long should have been used here.
--- arch/x86/boot/compressed/aslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/aslr.c +1 -1
@@ -195,7 +195,7 @@ static bool mem_avoid_overlap(struct mem_vector *img)while (ptr) {struct mem_vector avoid; - avoid.start = (u64 )ptr; + avoid.start = (unsigned long )ptr; avoid.size =sizeof (*ptr) + ptr->len;if (mem_overlaps (img, &avoid))
Signature · 6 lines
1.9.1 -- Kees Cook Chrome OS Security
tip-bot for Kees Cook
merge bot[tip:x86/urgent] x86, boot, kaslr: Fix nuisance warning on 32-bit builds
x86, boot, kaslr: Fix nuisance warning on 32-bit builds
Commit-ID: 20cc28882bf4a8c9a2605a9a76a7952e696aaece Gitweb: http://git.kernel.org/tip/20cc28882bf4a8c9a2605a9a76a7952e696aaece Author: Kees Cook <[email protected]> AuthorDate: Wed, 1 Oct 2014 11:36:32 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Wed, 1 Oct 2014 11:41:24 -0700
x86, boot, kaslr: Fix nuisance warning on 32-bit builds
Building 32-bit threw a warning on kASLR enabled builds:
arch/x86/boot/compressed/aslr.c: In function ‘mem_avoid_overlap’:arch/x86/boot/compressed/aslr.c:198:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
avoid.start = (u64)ptr;
^This fixes the warning; unsigned long should have been used here.
--- arch/x86/boot/compressed/aslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/aslr.c +1 -1
@@ -195,7 +195,7 @@ static bool mem_avoid_overlap(struct mem_vector *img)while (ptr) {struct mem_vector avoid; - avoid.start = (u64 )ptr; + avoid.start = (unsigned long )ptr; avoid.size =sizeof (*ptr) + ptr->len;if (mem_overlaps (img, &avoid))