Received: by 10.213.65.68 with SMTP id h4csp547368imn; Wed, 28 Mar 2018 08:22:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx498lfgztgqi12VCUM9jeI2bvYV4mvzriTdrlRO4p7U7y5kHfeZYbRqZhIT1NzS4Ych7MkWp X-Received: by 10.98.71.211 with SMTP id p80mr3341541pfi.136.1522250556399; Wed, 28 Mar 2018 08:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522250556; cv=none; d=google.com; s=arc-20160816; b=p4DwQeSV2SkhudbUr3y6yLmp1Y1691qqqbJEg8aEsKIW0XXjnrAf862tJgPzdlTYnj hFCvU2bs6AjAzEP3A0VjSB0UL2Wf2mG2EeGM0YAlN4sTQ3yQavJYICugAL3M1t6bPdl0 c/5i5h3hXj31oHz6SxXOCun++rWpLb1u67dCvY0XjhMUD4jDrSPANDKZ5Sx4xirDoAqr N79qgbT37Fl9OA8fSfUr2rkH404nqZ429O5nrPau1kn4fHsDXZvRIIFxtXC0Ejrvg/H6 q17H4C3Z+DJgcCxj0p6YgMx5WJOgWguf//6jcbIrylUmdp41doylpQMtn5xIQ/sWgxWO NkFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=QZ3e8WnuQry4oOvXj3lo2vBZjpu74P4AhDs1NIBl1mY=; b=KCSJmeHhHBJMLEBnKhiO3bGQGrTUMGXgnK9+ltt722V9P/wNaY+mNzTymGZT0lM5vy E6tigPgN6Xm1P2HnA5FlHaHFeZA3PDcEYF5Yh1/3OJPoCZM+kZUmovUM0pjRy6xs370Z LsnQhhzNc0CMYB4B197p+KPXs25FEuE8cIea3CM6hcM3P0R1eB6HWDWBCR3eTtnnf+KA vjBkPlUwj0keqmpNLnyNDrxPLG6tyAVEW5q5DvFuhFl8H/o/qi1ULR2MXUe7INVmHVez aw+bng6Cnz7pTwrvEvhjlOopkKycKbionJBMUd7GNAv1VyG/UV3ZhNdvHon+ssGXB8B1 7afQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d30-v6si3841798pld.92.2018.03.28.08.22.21; Wed, 28 Mar 2018 08:22:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753943AbeC1PVX (ORCPT + 99 others); Wed, 28 Mar 2018 11:21:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:46524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753611AbeC1PVV (ORCPT ); Wed, 28 Mar 2018 11:21:21 -0400 Received: from saruman (jahogan.plus.com [212.159.75.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA7752178C; Wed, 28 Mar 2018 15:21:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA7752178C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jhogan@kernel.org Date: Wed, 28 Mar 2018 16:21:15 +0100 From: James Hogan To: Huacai Chen , Kees Cook Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ralf Baechle , linux-mips@linux-mips.org, Russell King , linux-arm-kernel@lists.infradead.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH V4 Resend] ZBOOT: fix stack protector in compressed boot phase Message-ID: <20180328152115.GB1991@saruman> References: <1522226933-29317-1-git-send-email-chenhc@lemote.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline In-Reply-To: <1522226933-29317-1-git-send-email-chenhc@lemote.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 28, 2018 at 04:48:53PM +0800, Huacai Chen wrote: > diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/comp= ressed/decompress.c > index fdf99e9..81df904 100644 > --- a/arch/mips/boot/compressed/decompress.c > +++ b/arch/mips/boot/compressed/decompress.c > @@ -76,12 +76,7 @@ void error(char *x) > #include "../../../../lib/decompress_unxz.c" > #endif > =20 > -unsigned long __stack_chk_guard; > - > -void __stack_chk_guard_setup(void) > -{ > - __stack_chk_guard =3D 0x000a0dff; > -} > +const unsigned long __stack_chk_guard =3D 0x000a0dff; > =20 > void __stack_chk_fail(void) > { > @@ -92,8 +87,6 @@ void decompress_kernel(unsigned long boot_heap_start) > { > unsigned long zimage_start, zimage_size; > =20 > - __stack_chk_guard_setup(); > - > zimage_start =3D (unsigned long)(&__image_begin); > zimage_size =3D (unsigned long)(&__image_end) - > (unsigned long)(&__image_begin); This looks good to me, though I've Cc'd Kees as apparently the original author from commit 8779657d29c0 ("stackprotector: Introduce CONFIG_CC_STACKPROTECTOR_STRONG") in case there was a particular reason this wasn't done in the first place. Acked-by: James Hogan (Happy to apply with acks from Kees and ARM, SH maintainers if nobody else does). Cheers James --oC1+HKm2/end4ao3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd80NauSabkiESfLYbAtpk944dnoFAlq7suoACgkQbAtpk944 dnrxJxAAlrAgDS3oDkev9n/dI09IAb5AGksi/hRV8rvWiOecvAyIYE7RG0rthOmS 0loNyQOkdrydZy5n4BUO+OxjV8UJQnGazAeDPM5/gOqHZiuouSPg8JvfspH9dbCP MJ09R/ig3biJiSNRYlW8L+cD6Zo4Iy/aEfusc0i+cRAC2kHJDJe6D0XoXHYSk2mj Vx9jj9GoLTROXwtMhYRjsFb1qTfKL5NBY+66zMPV2pVnsQoV8PSMftdYz1RCU/VC iNVFI5/pus+YVNL2nTqhUXRQUNDvOGqMt08yk4P1gyMLPHzEUf3uKHn12pMYslI2 H+LGmfe8MdwVG+Mb554Y1di245/kGybclsAdqMUK1RtbzrfuDOYv6u8GAop/d6cg gjgnHstbImtbIyTGcT4aY4ntY/HftPJ/s7kTbIdFZGV0Pkzi4aCOiJSVqO/lLX0h FzM5sFf/YcGyDMw8zCDlL9OfRWImuzIn89xvwdsEtorZvtgI9syxPZSLU8fNNwAy jmPMm6PC1l5i+BwfO0UJO2M0HtIO/L9P3a67xdjrWZbMAFfp3X6PEGs1fu5c3QV1 MJ6SF316yu1pOnIbqLImqsY4/DYnHkhT3/evZAA5n4/Rxz3ICp+8OKYEbGmmbXV+ Bv7VIDn2vv+MlmIVDYELo1v+LWmX833VssiwXcHPlSS7s4XjT4w= =au7i -----END PGP SIGNATURE----- --oC1+HKm2/end4ao3--