]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
s390/decompressor: fix initrd corruption caused by bss clear
authorMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Mon, 13 Mar 2017 15:14:58 +0000 (12:14 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:12:23 +0000 (10:12 +0200)
commit9d05e7fa62e0d5cb06e3c97ca0b42868d3058829
tree3547bca509ad4d01f889f84957834d1da13ad021
parentc9ef9900ab19159fd3067ee79fafbcda19f1503d
s390/decompressor: fix initrd corruption caused by bss clear

BugLink: http://bugs.launchpad.net/bugs/1682130
commit d82c0d12c92705ef468683c9b7a8298dd61ed191 upstream.

Reorder the operations in decompress_kernel() to ensure initrd is moved
to a safe location before the bss section is zeroed.

During decompression bss can overlap with the initrd and this can
corrupt the initrd contents depending on the size of the compressed
kernel (which affects where the initrd is placed by the bootloader) and
the size of the bss section of the decompressor.

Also use the correct initrd size when checking for overlaps with
parmblock.

Fixes: 06c0dd72aea3 ([S390] fix boot failures with compressed kernels)
Reviewed-by: Joy Latten <joy.latten@canonical.com>
Reviewed-by: Vineetha HariPai <vineetha.hari.pai@canonical.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/s390/boot/compressed/misc.c