From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux-s390@vger.kernel.org,
Peter Oberparleiter <oberpar@linux.vnet.ibm.com>,
Joy Latten <joy.latten@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/decompressor: fix initrd corruption caused by bss clear
Date: Mon, 13 Mar 2017 16:27:29 +0100 [thread overview]
Message-ID: <20170313152729.GC5009@osiris> (raw)
In-Reply-To: <1489418098-1564-1-git-send-email-marcelo.cerri@canonical.com>
On Mon, Mar 13, 2017 at 12:14:58PM -0300, Marcelo Henrique Cerri wrote:
> 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)
> Cc: stable@vger.kernel.org
> 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>
> ---
> arch/s390/boot/compressed/misc.c | 35 +++++++++++++++++++----------------
> 1 file changed, 19 insertions(+), 16 deletions(-)
Indeed. I just checked that we currently have 32 bytes within the bss
section of the compressed kernel image, where clearing it would corrupt the
initrd if would be placed directly behind the image.
I will look into the patch tomorrow.
Thanks,
Heiko
next prev parent reply other threads:[~2017-03-13 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 15:14 [PATCH] s390/decompressor: fix initrd corruption caused by bss clear Marcelo Henrique Cerri
2017-03-13 15:27 ` Heiko Carstens [this message]
2017-03-15 8:41 ` Heiko Carstens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170313152729.GC5009@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=joy.latten@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=oberpar@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox