s390/kasan: sort out physical vs virtual memory confusion
The kasan early boot memory allocators operate on pgalloc_pos and segment_pos physical address pointers, but fail to convert it to the corresponding virtual pointers. Currently it is not a problem, since virtual and physical addresses on s390 are the same. Nevertheless, should they ever differ, this would cause an invalid pointer access. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
639886b71d
commit
aae2f753d2
|
@ -39,7 +39,7 @@ static void * __init kasan_early_alloc_segment(void)
|
|||
if (segment_pos < segment_low)
|
||||
kasan_early_panic("out of memory during initialisation\n");
|
||||
|
||||
return (void *)segment_pos;
|
||||
return __va(segment_pos);
|
||||
}
|
||||
|
||||
static void * __init kasan_early_alloc_pages(unsigned int order)
|
||||
|
@ -49,7 +49,7 @@ static void * __init kasan_early_alloc_pages(unsigned int order)
|
|||
if (pgalloc_pos < pgalloc_low)
|
||||
kasan_early_panic("out of memory during initialisation\n");
|
||||
|
||||
return (void *)pgalloc_pos;
|
||||
return __va(pgalloc_pos);
|
||||
}
|
||||
|
||||
static void * __init kasan_early_crst_alloc(unsigned long val)
|
||||
|
|
Loading…
Reference in New Issue