Received: by 10.213.65.68 with SMTP id h4csp3022imn; Fri, 16 Mar 2018 15:14:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELv22beYAKf9g9tZbUjN+opZ8fFaIEQ5OzGvcKbG1EQ5tSTq4bBavSKEOTM2PgnxsRH7+1F/ X-Received: by 10.99.61.204 with SMTP id k195mr2731852pga.312.1521238494918; Fri, 16 Mar 2018 15:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521238494; cv=none; d=google.com; s=arc-20160816; b=Ct36b4amFQpz5gLkgYiIqmltYcjbz6KfMg4riXuIkSKYGcMI2z60i/bjGD3vmHEYuj xzEYS2ScGCJxSNkFbf4UYpXqe9k3Jml2tcdabbzx8vadUeVA98haAe7kDXI5sX7qfYxA SG5CbqhbyUi6zf4NjzDxtUxB6xjL8YhCEtR+R5rI1JhP7wMB/U7HYDr5Ub+S+EP/j1tY EN1G3kZBeFDxOkjMQF/NSDjHtb3DfWoPCyXO3AccbQAWDePSWaIk5ysXS2sOOUYldQ6e 2PhGpsHmVKPtpfomr3mRqNxvaXKDeEU02u83hjqmMmJxCksJRFgnszux5d5gqt/fMltX hwbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=y2ic19K+zmp8GQuxrD/ZNZ2Pnj0814LgVVN/xuZkHmc=; b=h4r/46sJ9cnYiGUqdxamlbmmRHOnW/FjIuCaDS+5eQrB22Vq4+xbIvYAX42KJ/JRY4 4mlqRSAsk+xjbGhKMxPKR2ZYpIhgHew2LD3BvZCo2nZsQwkIfUgg0V8mL4EAPNxcBcPw YeJLxq0U1os+l8LOhw140GpMe9NYItLHOmUy0LhzoZRIwCtwIuZUo8DERjfsed1YxOQR MZ2acSJgGILJcLnAeBh6hg9z5gWgjahLgMaf8afZV7AMkXFIkEinQzqQoEiwA1cnITrX wIHsA0dKKNTlGMDf55nIvCvlFWHkq9L0d2Re8PIEmLsG9c0jT4mRgF+ss7lN/6Q8x/SV r45Q== 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 m25si5724671pge.338.2018.03.16.15.14.40; Fri, 16 Mar 2018 15:14:54 -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 S1752523AbeCPWNl (ORCPT + 99 others); Fri, 16 Mar 2018 18:13:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58850 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbeCPWNj (ORCPT ); Fri, 16 Mar 2018 18:13:39 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E06F3D06; Fri, 16 Mar 2018 22:13:38 +0000 (UTC) Date: Fri, 16 Mar 2018 15:13:37 -0700 From: Andrew Morton To: Huacai Chen Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ralf Baechle , James Hogan , 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 V3] ZBOOT: fix stack protector in compressed boot phase Message-Id: <20180316151337.f277e3a734326672d41cec61@linux-foundation.org> In-Reply-To: <1521186916-13745-1-git-send-email-chenhc@lemote.com> References: <1521186916-13745-1-git-send-email-chenhc@lemote.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Mar 2018 15:55:16 +0800 Huacai Chen wrote: > Call __stack_chk_guard_setup() in decompress_kernel() is too late that > stack checking always fails for decompress_kernel() itself. So remove > __stack_chk_guard_setup() and initialize __stack_chk_guard before we > call decompress_kernel(). > > Original code comes from ARM but also used for MIPS and SH, so fix them > together. If without this fix, compressed booting of these archs will > fail because stack checking is enabled by default (>=4.16). > > ... > > arch/arm/boot/compressed/head.S | 4 ++++ > arch/arm/boot/compressed/misc.c | 7 ------- > arch/mips/boot/compressed/decompress.c | 7 ------- > arch/mips/boot/compressed/head.S | 4 ++++ > arch/sh/boot/compressed/head_32.S | 8 ++++++++ > arch/sh/boot/compressed/head_64.S | 4 ++++ > arch/sh/boot/compressed/misc.c | 7 ------- > 7 files changed, 20 insertions(+), 21 deletions(-) Perhaps this should be split into three patches and each one routed via the appropriate arch tree maintainer (for sh, that might be me). But we can do it this way if the arm and mips teams can send an ack, please?