Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp153192pxa; Fri, 31 Jul 2020 08:35:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/PIxxKdrNdhvGWWO36Jfa5g8DNGCUi3WCvRqSuU7LGBSZVQWOuvmzTquTuNxErpuW2MIH X-Received: by 2002:a50:d8c2:: with SMTP id y2mr4401624edj.114.1596209722908; Fri, 31 Jul 2020 08:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596209722; cv=none; d=google.com; s=arc-20160816; b=Qmx4DQJtVJxkqRgyl+AZ7y3g3EdtkoZ4rHLmOM+J64WdPlz7AZqnO4FkqMT3vupI8h hCPjJcxFtRVh9wmjjmUTKYo4vgrl2JIDVyqsqGYEG+/RHzdwoUmov6rWPZyvr1A9lLY4 o4UPvrsAMh7f9hk5Bac295eWKFbXMfEEj10cT6UZUdO6Uwvg4tYT2a11HwWaG4VHhBaz WdSYtZ87aggWW4elEqfri2Hxahtuh9n5+qILJut6BJYZuxhEOyz/L/5IJrjm2EKbyXCp Cc1vB6p9hHItbWs6ZcR0bRwY77/b5hPUO5nFEiSFspf9VuOUL6Z3HxTcXNMXuJVjEr3c zrJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OcBTMjJZyKrgcmG5mdDnExOAmNLWbDS79mY86PrA2RY=; b=BfaoYHXdu1RGmbTjiPwOorHZL/u83yGwn4g01iKpPSVxSZ2PouTJRrrqkT4J7oXcKM OGfBYjyjPY5k34sodvTvSgJAqn39kEChE8cGZZW+w8k2zyH2kypEli9b8ErEgRslmc/b eKFeuZMpfctqu43gpxHDYq3ETtzgabYnF9ihrTfVf5feJlMksF4nGvoZ3pPtAPWcEjIp WMrJvLH3MYSerHbKoKoWP1S6gNtKRv7efnEtt1rQWZAiqEoenDkG97vNWfoarYPRQqyp rIlOb3i8svrZDvVicW6aOJvJ/2GcysZcbjnZVVAnraDqOBKMwCTiaWYTLcFtUEGUktrE RTBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si5370058edy.381.2020.07.31.08.35.00; Fri, 31 Jul 2020 08:35:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732590AbgGaPcG (ORCPT + 99 others); Fri, 31 Jul 2020 11:32:06 -0400 Received: from foss.arm.com ([217.140.110.172]:34546 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbgGaPcG (ORCPT ); Fri, 31 Jul 2020 11:32:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 943611FB; Fri, 31 Jul 2020 08:32:05 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.4.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A97423F66E; Fri, 31 Jul 2020 08:32:03 -0700 (PDT) Date: Fri, 31 Jul 2020 16:32:01 +0100 From: Mark Rutland To: Maninder Singh Cc: catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, akpm@linux-foundation.org, Dave.Martin@arm.com, 0x7f454c46@gmail.com, peterz@infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, a.sahrawat@samsung.com, v.narang@samsung.com Subject: Re: [PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack Message-ID: <20200731153201.GB67415@C02TD0UTHF1T.local> References: <1596196190-14141-1-git-send-email-maninder1.s@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1596196190-14141-1-git-send-email-maninder1.s@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 31, 2020 at 05:19:50PM +0530, Maninder Singh wrote: > IRQ_STACK_SIZE can be made different from THREAD_SIZE, While that's true in theory, IRQ_STACK_SIZE is defined as: | #define IRQ_STACK_SIZE THREAD_SIZE ... which *must* be the case or the overflow detction will either miss some overflows, or spuriously detect overflows where there are none. Pleased beware if you are changing this locally. > and as IRQ_STACK_SIZE is used while irq stack allocation, > same define should be used while printing information of irq stack. > > Signed-off-by: Maninder Singh Regardless of the above, it is best to use the more specific mnemonic, so: Acked-by: Mark Rutland I'll leave it to Catalin and Will to pick this up. Mark. > --- > arch/arm64/kernel/traps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c > index 47f651d..13ebd5c 100644 > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@ -855,7 +855,7 @@ asmlinkage void handle_bad_stack(struct pt_regs *regs) > pr_emerg("Task stack: [0x%016lx..0x%016lx]\n", > tsk_stk, tsk_stk + THREAD_SIZE); > pr_emerg("IRQ stack: [0x%016lx..0x%016lx]\n", > - irq_stk, irq_stk + THREAD_SIZE); > + irq_stk, irq_stk + IRQ_STACK_SIZE); > pr_emerg("Overflow stack: [0x%016lx..0x%016lx]\n", > ovf_stk, ovf_stk + OVERFLOW_STACK_SIZE); > > -- > 1.9.1 >