Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 060e043a authored by Marcelo Henrique Cerri's avatar Marcelo Henrique Cerri Committed by Harsh Shandilya
Browse files

s390/decompressor: fix initrd corruption caused by bss clear



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: 06c0dd72 ([S390] fix boot failures with compressed kernels)
Reviewed-by: default avatarJoy Latten <joy.latten@canonical.com>
Reviewed-by: default avatarVineetha HariPai <vineetha.hari.pai@canonical.com>
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent e86e1de0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment