Received: by 10.213.65.68 with SMTP id h4csp437997imn; Tue, 27 Mar 2018 02:06:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvU35JOXCX3inA6S+nukr9euN/5EarhAqe53A8h8JVo1l8a5N4+6kHG1eztdlgVapbrhbEJ X-Received: by 2002:a17:902:2a43:: with SMTP id i61-v6mr44293841plb.54.1522141598399; Tue, 27 Mar 2018 02:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522141598; cv=none; d=google.com; s=arc-20160816; b=KRZHX2YbM9Cq6frfB9qRXPnyrtC6dtZqETUzuZA+7fDQnMReBNgMHZnfuvALvTQ6Xr 1C/9okeDiyrElPaVvS259wfpDsltSRNIiVmgkeEK4GFx5ttbzXDbJCy+wC/iErFav+ff o2lZa31HddzlhMwIat51S30Zdhqn+xOkfHg/H7vo8K6RqzkRXJ2VjLIbEFogKUt/JJ93 AyM1/u+GWxTvSrS7AaMqIw/00/U1KUagc9vnuBBuoW8u+UiX1K4PjJ1daAsyCt+H783A DSy9y3Bt7NhkO1ESQZTSxdWFhgCSH4MhFdYRzZz+MFdtx8Zm0kHF1WpEHiW6OY33E1LJ vtFw== 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:dkim-signature:arc-authentication-results; bh=SAWjVfhHIOuUTTCybb4tZGRrOYHUFrMwPGGmre6JSpQ=; b=eGA0le8heu1j2v/R8Jq8n3AtbxmhtDl5bkJUBpiMjgBYeszfv9XKPvZn9DVz3VbEiK KpjyT1imDZ6abidPml6mahWiAfKi66GFR5jNGFTNEWaaoyy1zkFt8C8/6tKIVzcwSHbH M/cPX45xb731Nea13nE2pTuxrzwKkDV0wznWLISl/q9fwpyEJp7AVsohNq2APDdSGRvU 6dsB9q0O0hlmSTgIjRgdf05f9hsbtQ/WsmvO1rXQzE2WefDcmMpo0NganvC9UpZHFNPG 9oBCXPSexrNxbbOY4DFZdUgs/iHMjTQFA6sWep4RMTjt3OvOyT/3opFl5ImYPbEdgUWU ZZSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=SMpqrDdV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si589098pgn.337.2018.03.27.02.06.23; Tue, 27 Mar 2018 02:06:38 -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; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=SMpqrDdV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752116AbeC0JEn (ORCPT + 99 others); Tue, 27 Mar 2018 05:04:43 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:55484 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbeC0JEl (ORCPT ); Tue, 27 Mar 2018 05:04:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=SAWjVfhHIOuUTTCybb4tZGRrOYHUFrMwPGGmre6JSpQ=; b=SMpqrDdVxmeLwvM8K/nE58kz2R9/ffrAJXVhUeXjafq0IXuNugB536aUevRKgbzFuIYN5+kP15S9B2Ut4/Ez6M7XyLBr5c7g8AbwmMnMBVGCqZC6AYlcqYG1HcWIWa2JjC6VIaADp/9G44Y2BkRce/hK8ekBKRd0Ni2x/vNxS/w=; Received: from n2100.armlinux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:49470) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1f0kWd-00032n-TI; Tue, 27 Mar 2018 10:04:16 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1f0kWZ-00064e-H7; Tue, 27 Mar 2018 10:04:11 +0100 Date: Tue, 27 Mar 2018 10:04:10 +0100 From: Russell King - ARM Linux To: Tony Lindgren Cc: Huacai Chen , Andrew Morton , Stephen Rothwell , Ralf Baechle , James Hogan , Yoshinori Sato , Rich Felker , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: Regression with arm in next with stack protector Message-ID: <20180327090409.GA10990@n2100.armlinux.org.uk> References: <20180323181452.GJ5799@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180323181452.GJ5799@atomide.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 23, 2018 at 11:14:53AM -0700, Tony Lindgren wrote: > Hi, > > Looks like commit 5638790dadae ("zboot: fix stack protector in > compressed boot phase") breaks booting on arm. > > This is all I get from the bootloader on omap3: > > Starting kernel ... > > data abort > pc : [<810002d0>] lr : [<100110a8>] > reloc pc : [<9d6002d0>] lr : [<2c6110a8>] > sp : 81467c18 ip : 81466bf0 fp : 81466bf0 > r10: 80fc2c40 r9 : 81000258 r8 : 86fec000 > r7 : ffffffff r6 : 81466bf8 r5 : 00000000 r4 : 80008000 > r3 : 81466c14 r2 : 81466c18 r1 : 000a0dff r0 : 00466bf8 > Flags: nZCv IRQs off FIQs off Mode SVC_32 > Resetting CPU ... > > resetting ... The reason for this is the following code that was introduced by the referenced patch: + ldr r0, =__stack_chk_guard + ldr r1, =0x000a0dff + str r1, [r0] This uses the absolute address of __stack_chk_guard in the decompressor, which is a self-relocatable image. As with all constructs like the above, this absolute address doesn't get fixed up, and so it ends up pointing at invalid memory (in this case 0x466bf8) vs RAM at 0x80000000, and the decompressor looks to be around 0x81000000. Such constructs can not be used in the decompressor for exactly this reason - they need to use PC-relative addressing instead just like everything else does in head.S. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up