diff options
author | Kees Cook <keescook@chromium.org> | 2014-10-01 14:36:32 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-10-01 14:41:24 -0400 |
commit | 20cc28882bf4a8c9a2605a9a76a7952e696aaece (patch) | |
tree | 277cee1b9952b434b3bcbe6c84b7b4527d0a96ae /arch/x86 | |
parent | fe82dcec644244676d55a1384c958d5f67979adb (diff) |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/boot/compressed/aslr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index d39189ba7f8e..f302dc45ce08 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c | |||
@@ -195,7 +195,7 @@ static bool mem_avoid_overlap(struct mem_vector *img) | |||
195 | while (ptr) { | 195 | while (ptr) { |
196 | struct mem_vector avoid; | 196 | struct mem_vector avoid; |
197 | 197 | ||
198 | avoid.start = (u64)ptr; | 198 | avoid.start = (unsigned long)ptr; |
199 | avoid.size = sizeof(*ptr) + ptr->len; | 199 | avoid.size = sizeof(*ptr) + ptr->len; |
200 | 200 | ||
201 | if (mem_overlaps(img, &avoid)) | 201 | if (mem_overlaps(img, &avoid)) |