From patchwork Fri Jan 17 02:20:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 311912 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 4732D2C02FA for ; Fri, 17 Jan 2014 13:21:51 +1100 (EST) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D17A42C0097 for ; Fri, 17 Jan 2014 13:21:25 +1100 (EST) Received: by mail-pb0-f50.google.com with SMTP id rq2so3465495pbb.37 for ; Thu, 16 Jan 2014 18:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=fl81I4u/WWtCow8nEjyecnHNzetEkSHAEkPqb/phVvg=; b=eyBku8X2xFtal8r9bwN/0rwDaEvmbq2Wq1tyhlaDpfWbJaulhBrpoPmzLCBIu/qlbv 5eShRcx0dfksK3B2pCD7yZDkYHb4FMQaSZ70J8hLTKmPCPbIpwRhWdnizs/16a1Fzwk3 LEj6bRzyPZSmcupHbF4eiWCkHDXKAqhr7JEgk5ouBGAJ5SkEiA80gzRtEcgaURUGGHep jrMMcy2rNI+zgJ30ws8KCX9oZ/w5DOpRWEIA0XUmFxiRS484ZAKddyBBjbi7PGsuLKDb IdzC+7L4zsGxJ9Cj3QoqwKCQr2UldM5vALeRCAD4oVFnFw9OIix01T7VIYUW7mNwYarf F2Xg== X-Received: by 10.68.201.226 with SMTP id kd2mr13593882pbc.157.1389925283215; Thu, 16 Jan 2014 18:21:23 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([1.202.252.122]) by mx.google.com with ESMTPSA id tu3sm24773498pab.1.2014.01.16.18.20.25 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Jan 2014 18:21:21 -0800 (PST) Date: Fri, 17 Jan 2014 10:20:05 +0800 From: Kevin Hao To: Guenter Roeck Subject: Re: Kernel stack overflows due to "powerpc: Remove ksp_limit on ppc64" with v3.13-rc8 on ppc32 (P2020) Message-ID: <20140117022005.GA29880@pek-khao-d1.corp.ad.wrs.com> References: <20140116180532.GA1616@roeck-us.net> MIME-Version: 1.0 In-Reply-To: <20140116180532.GA1616@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Jan 16, 2014 at 10:05:32AM -0800, Guenter Roeck wrote: > Hi all, > > I am getting kernel stack overflows with v3.13-rc8 on a system with P2020 CPU. > The kernel is patched for the target, but I don't think that is related. > Stack overflows are in different areas, but always in calls from __do_softirq. > > Crashes happen reliably either during boot or if I put any kind of load > onto the system. How about the following fix: Thanks, Kevin > > Example: > > Kernel stack overflow in process eb3e5a00, r1=eb79df90 > CPU: 0 PID: 2838 Comm: ssh Not tainted 3.13.0-rc8-juniper-00146-g19eca00 #4 > task: eb3e5a00 ti: c0616000 task.ti: ef440000 > NIP: c003a420 LR: c003a410 CTR: c0017518 > REGS: eb79dee0 TRAP: 0901 Not tainted (3.13.0-rc8-juniper-00146-g19eca00) > MSR: 00029000 CR: 24008444 XER: 00000000 > GPR00: c003a410 eb79df90 eb3e5a00 00000000 eb05d900 00000001 65d87646 00000000 > GPR08: 00000000 020b8000 00000000 00000000 44008442 > NIP [c003a420] __do_softirq+0x94/0x1ec > LR [c003a410] __do_softirq+0x84/0x1ec > Call Trace: > [eb79df90] [c003a410] __do_softirq+0x84/0x1ec (unreliable) > [eb79dfe0] [c003a970] irq_exit+0xbc/0xc8 > [eb79dff0] [c000cc1c] call_do_irq+0x24/0x3c > [ef441f20] [c00046a8] do_IRQ+0x8c/0xf8 > [ef441f40] [c000e7f4] ret_from_except+0x0/0x18 > --- Exception: 501 at 0xfcda524 > LR = 0x10024900 > Instruction dump: > 7c781b78 3b40000a 3a73b040 543c0024 3a800000 3b3913a0 7ef5bb78 48201bf9 > 5463103a 7d3b182e 7e89b92e 7c008146 <3ba00000> 7e7e9b78 48000014 57fff87f > Kernel panic - not syncing: kernel stack overflow > CPU: 0 PID: 2838 Comm: ssh Not tainted 3.13.0-rc8-juniper-00146-g19eca00 #4 > Call Trace: > Rebooting in 180 seconds.. > > Reverting the following commit fixes the problem. > > cbc9565ee8 "powerpc: Remove ksp_limit on ppc64" > > Should I submit a patch reverting this commit, or is there a better way to fix > the problem on short notice (given that 3.13 is close) ? > > Thanks, > Guenter > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev Tested-by: Guenter Roeck diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index e47d268727a4..52fffe5616b4 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -61,7 +61,7 @@ _GLOBAL(call_do_irq) mflr r0 stw r0,4(r1) lwz r10,THREAD+KSP_LIMIT(r2) - addi r11,r3,THREAD_INFO_GAP + addi r11,r4,THREAD_INFO_GAP stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r4) mr r1,r4 stw r10,8(r1)