From patchwork Thu Oct 8 07:15:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maninder Singh X-Patchwork-Id: 11822257 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25E501580 for ; Thu, 8 Oct 2020 07:18:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9DEE20739 for ; Thu, 8 Oct 2020 07:18:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SuXXfXFr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="IAnqBBhI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9DEE20739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:Message-Id:Date:Subject:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=98CTVKlGMoIXbIJ4/ckYZsk9iiF/do4u8TrqdpjZZBo=; b=SuXXfXFrsjmmtBvURf+jQNTKDN HZV9vzv6Ei00coMxC7I2CShphmQ5rvnUukK9AE+IyphdpEEBeKWH5W5wyWkUEi12z8gxUrHxlB95b BWRFoNyeMARd/ydRQlv1kmvxTK4paPYCdnuE9WRP5EmPhjJVakNLqAlbILcScZyid7rZe5OWLloqb EkcykgFQNQY26CVVjAazqfpcI1SXi+Yra0RKyI0y/Gx1I/BS8oV8JqBTbHIt16+jTmANl0/G0D7hx +Edk8X7nRW3hoBqCpH10ch3hfzbEM8eYfZ1XlsaqZ0+nOPTHBjUy4Yw7GiwYyQ1ru6O8JnWMNX8Bh NC6RfxYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQQBh-0004gd-SR; Thu, 08 Oct 2020 07:18:05 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQQBc-0004ey-4S for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2020 07:18:02 +0000 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20201008071758epoutp0355c0321ad369a9eee3e1bde44d5adc98~78y_OKRj41026410264epoutp03D for ; Thu, 8 Oct 2020 07:17:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20201008071758epoutp0355c0321ad369a9eee3e1bde44d5adc98~78y_OKRj41026410264epoutp03D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602141478; bh=D7TrO2gtlsUp4TeZi+CZcJBHHLsLnIlsDOu+joF8goE=; h=From:To:Cc:Subject:Date:References:From; b=IAnqBBhIoA3T8Rm+dqgDeb/mVGZLkS/cdXKxbtbjytmd0VosdKmsQD51CPEvj5HjE 10Clp30ni/4l6HoT1il94gOTeSJPqePNElaYs1kQ8ymQDIM2S/N4qMDNWDgJNDjbG8 y4U/yhu4ZKVs/SsOWgPTXt4FZttsOrh1zdM9dvmI= Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20201008071757epcas5p41cb9c5ec51216fe2423d936d2cb140c0~78y9vTvBF2056220562epcas5p4T; Thu, 8 Oct 2020 07:17:57 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id E3.AF.09922.52DBE7F5; Thu, 8 Oct 2020 16:17:57 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20201008071628epcas5p24d196a6023a47a3b0bfa7b7f231ec811~78xqfKEWj2308523085epcas5p2p; Thu, 8 Oct 2020 07:16:28 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201008071628epsmtrp16515fb01720e97a643864021481c35b7~78xqeVIIs1688916889epsmtrp1a; Thu, 8 Oct 2020 07:16:28 +0000 (GMT) X-AuditID: b6c32a4a-337ff700000026c2-4a-5f7ebd2576a2 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7B.9A.08745.BCCBE7F5; Thu, 8 Oct 2020 16:16:27 +0900 (KST) Received: from localhost.localdomain (unknown [107.109.224.135]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201008071624epsmtip1725f392a040f519009dbe42f9f635132~78xndnNkB1815718157epsmtip13; Thu, 8 Oct 2020 07:16:24 +0000 (GMT) From: Maninder Singh To: linux@armlinux.org.uk, ndesaulniers@google.com, caij2003@gmail.com, tglx@linutronix.de, bigeasy@linutronix.de, maz@kernel.org, valentin.schneider@arm.com, vincent.whitchurch@axis.com, nhuck@google.com, akpm@linux-foundation.org, 0x7f454c46@gmail.com, will@kernel.org Subject: [PATCH 0/3] IRQ stack support for ARM Date: Thu, 8 Oct 2020 12:45:30 +0530 Message-Id: <1602141333-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5juguztwnPuvbJezyNq0V1T1tWqvt/lbqOU+E qZpfpNianTsVT3Ff6Nz3VLXm+3EeJZbijERDLeai4kQAnXyV194CAAA= X-CMS-MailID: 20201008071628epcas5p24d196a6023a47a3b0bfa7b7f231ec811 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20201008071628epcas5p24d196a6023a47a3b0bfa7b7f231ec811 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201008_031800_663118_DFE4231D X-CRM114-Status: GOOD ( 15.87 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.33 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: v.narang@samsung.com, Maninder Singh , a.sahrawat@samsung.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Observed Stack Overflow on 8KB kernel stack on ARM specially incase on network interrupts, which results in undeterministic behaviour. So there is need for per cpu dedicated IRQ stack for ARM. As ARm does not have extra co-processor register to save thread info pointer, IRQ stack will be at some performance cost, so code is under CONFIG_IRQ_STACK. and we don't have much knowledge and set up for CLANG and ARM_UNWIND, so dependency added for both cases. Tested patch set with QEMU for latest kernel and 4.1 kernel for ARM target with same patch set. Maninder Singh, Vaneet Narang (3): arm: introduce self pointer in thread info arm: introduce IRQ stacks arm: Modify stack trace and dump for use with irq stack arch/arm/Kconfig | 10 ++++++++ arch/arm/include/asm/assembler.h | 11 +++++++++ arch/arm/include/asm/irq.h | 13 +++++++++++ arch/arm/include/asm/thread_info.h | 27 ++++++++++++++++++++++ arch/arm/kernel/entry-armv.S | 41 ++++++++++++++++++++++++++++++++- arch/arm/kernel/irq.c | 24 +++++++++++++++++++ arch/arm/kernel/stacktrace.c | 21 +++++++++++++++++ arch/arm/kernel/traps.c | 47 +++++++++++++++++++++++++++++++++++--- arch/arm/lib/backtrace.S | 18 +++++++++++++++ include/linux/thread_info.h | 4 ++++ kernel/fork.c | 1 + 11 files changed, 213 insertions(+), 4 deletions(-)