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: 2840663 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 11532BF535 for ; Wed, 7 Aug 2013 23:11:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28632204E2 for ; Wed, 7 Aug 2013 23:11:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC983204D8 for ; Wed, 7 Aug 2013 23:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933561Ab3HGXLQ (ORCPT ); Wed, 7 Aug 2013 19:11:16 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:40696 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933540Ab3HGXLP (ORCPT ); Wed, 7 Aug 2013 19:11:15 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Nicolas Pitre , Tony Lindgren , Olof Johansson 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) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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(-) --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)