aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/boot/ipl_parm.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2019-08-16 10:43:55 +0200
committerVasily Gorbik <gor@linux.ibm.com>2019-08-21 12:58:53 +0200
commit22a33c7e4ed6aae8c47de72461162021dad87473 (patch)
tree2d63962fbdb65ce30a2bd0c41cbe8e9652d72489 /arch/s390/boot/ipl_parm.c
parents390/startup: adjust _sdma and _edma to page boundaries (diff)
downloadlinux-dev-22a33c7e4ed6aae8c47de72461162021dad87473.tar.xz
linux-dev-22a33c7e4ed6aae8c47de72461162021dad87473.zip
s390/startup: round down "mem" option to page boundary
Make a usable value out of "mem" option once and for all. Kasan memory allocator just takes memory_end or online memory size as allocation base. If memory_end is not aligned paging structures allocated in kasan end up unaligned as well. So this change fixes potential kasan crash as well. Fixes: 78333d1f908a ("s390/kasan: add support for mem= kernel parameter") Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to '')
-rw-r--r--arch/s390/boot/ipl_parm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/boot/ipl_parm.c b/arch/s390/boot/ipl_parm.c
index 449d26a42f3f..4a052a844f9b 100644
--- a/arch/s390/boot/ipl_parm.c
+++ b/arch/s390/boot/ipl_parm.c
@@ -224,7 +224,7 @@ void parse_boot_command_line(void)
args = next_arg(args, &param, &val);
if (!strcmp(param, "mem")) {
- memory_end = memparse(val, NULL);
+ memory_end = round_down(memparse(val, NULL), PAGE_SIZE);
memory_end_set = 1;
}