From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 15 Mar 2017 09:41:27 +0100 From: Heiko Carstens Subject: Re: [PATCH] s390/decompressor: fix initrd corruption caused by bss clear References: <1489418098-1564-1-git-send-email-marcelo.cerri@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489418098-1564-1-git-send-email-marcelo.cerri@canonical.com> Message-Id: <20170315084127.GC6039@osiris> Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: Marcelo Henrique Cerri Cc: Martin Schwidefsky , linux-s390@vger.kernel.org, Peter Oberparleiter , Joy Latten , linux-kernel@vger.kernel.org List-ID: 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 > Reviewed-by: Vineetha HariPai > Signed-off-by: Marcelo Henrique Cerri > --- > arch/s390/boot/compressed/misc.c | 35 +++++++++++++++++++---------------- > 1 file changed, 19 insertions(+), 16 deletions(-) Applied. Thank you!