From patchwork Wed Aug 7 23:08:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 2840664 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 852189F479 for ; Wed, 7 Aug 2013 23:11:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D26720507 for ; Wed, 7 Aug 2013 23:11:21 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C6CA204E2 for ; Wed, 7 Aug 2013 23:11:20 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Csw-00064F-MR; Wed, 07 Aug 2013 23:11:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Csu-0000gV-Fn; Wed, 07 Aug 2013 23:11:16 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Csi-0000d5-R7 for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2013 23:11:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Y01+ZU130osPOwj+3xWpgx1nlDw+CxLuAU0Rdttq07U=; b=KLnW2yvONN9+/hzJhjsb1XOug2W0EG/0RGms2Ve6uGEcZrWsy+72MJgzXHbLXpUJNEqlP836vYp9LIj95w6cKud+G3jc8Da4XOrT4Mw0vGdhFjDmwPvTTiUu0PchCK+vDKa2dQYAqjtsM4jjOY6e2wWeM7K+cAElvsPqGKoP0fY=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:39579) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1V7Cqg-0001Qa-FD; Thu, 08 Aug 2013 00:08:58 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1V7Cqe-0006bh-OX; Thu, 08 Aug 2013 00:08:56 +0100 Date: Thu, 8 Aug 2013 00:08:56 +0100 From: Russell King - ARM Linux To: Aaro Koskinen Subject: Re: v3.11-rc4: OMAP1/Amstrad Delta (E3) crash Message-ID: <20130807230856.GJ23053@n2100.arm.linux.org.uk> References: <20130806232609.GB15014@blackmetal.musicnaut.iki.fi> <20130807190521.GD15014@blackmetal.musicnaut.iki.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130807190521.GD15014@blackmetal.musicnaut.iki.fi> User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130807_191105_446866_AEA53315 X-CRM114-Status: GOOD ( 22.95 ) X-Spam-Score: -1.2 (-) Cc: Tony Lindgren , Olof Johansson , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Pitre X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Aug 07, 2013 at 10:05:21PM +0300, Aaro Koskinen wrote: > Hi, > > On Wed, Aug 07, 2013 at 02:26:09AM +0300, Aaro Koskinen wrote: > > I get the following on Amstrad Delta (E3) when booting unpatched > > v3.11-rc4. The kernel config is after the crash. > > This is regression introduced between -rc3 and -rc4. According to the > git bisect, the first bad commit is: > > commit e39e3f3ebfef03450cf7bfa7a974a8c61f7980c8 > Author: Russell King > Date: Tue Jul 9 01:03:17 2013 +0100 > > ARM: update FIQ support for relocation of vectors > > If I revert the commit from v3.11-rc4, the board boots fine. > > A. > > > Uncompressing Linux... done, booting the kernel. > > [ 0.000000] Booting Linux on physical CPU 0x0 > > [ 0.000000] Initializing cgroup subsys cpu > > [ 0.000000] Linux version 3.11.0-rc4-e3 (aaro@blackmetal) (gcc version 4.7.3 (GCC) ) #4 PREEMPT Wed Aug 7 02:03:27 EEST 2013 > > [ 0.000000] bootconsole [earlycon0] enabled > > [ 0.000000] OMAP1510 > > [ 0.000000] revision 2 handled as 15xx id: bc058c9b93111a16 Hmm, so ARM925T which is VIVT... > > [ 0.238868] Installing fiq handler from c001b110, length 0x164 > > [ 0.245750] Unable to handle kernel paging request at virtual address ffff1224 In one way, that's good news - that's public independent proof that the code associated with the vectors is well protected from kernel writes. :) Can you try this (untested) patch please? We need to write into this page via the page's alias, rather than directly to it. Thanks. arch/arm/kernel/fiq.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 25442f4..fc79202 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -84,17 +84,13 @@ int show_fiq_list(struct seq_file *p, int prec) void set_fiq_handler(void *start, unsigned int length) { -#if defined(CONFIG_CPU_USE_DOMAINS) - void *base = (void *)0xffff0000; -#else void *base = vectors_page; -#endif unsigned offset = FIQ_OFFSET; memcpy(base + offset, start, length); + if (!cache_is_vipt_nonaliasing()) + flush_icache_range(base + offset, offset + length); flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length); - if (!vectors_high()) - flush_icache_range(offset, offset + length); } int claim_fiq(struct fiq_handler *f)