Skip to content

Commit 20cc288

Browse files
keesH. Peter Anvin
authored andcommitted
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. Signed-off-by: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/r/20141001183632.GA11431@www.outflux.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent fe82dce commit 20cc288

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/boot/compressed

1 file changed

+1
-1
lines changed

arch/x86/boot/compressed/aslr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static bool mem_avoid_overlap(struct mem_vector *img)
195195
while (ptr) {
196196
struct mem_vector avoid;
197197

198-
avoid.start = (u64)ptr;
198+
avoid.start = (unsigned long)ptr;
199199
avoid.size = sizeof(*ptr) + ptr->len;
200200

201201
if (mem_overlaps(img, &avoid))

0 commit comments

Comments
 (0)