linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack
       [not found] <CGME20200731121259epcas5p11248853c0578f2e426ab828310c9e855@epcas5p1.samsung.com>
@ 2020-07-31 11:49 ` Maninder Singh
  2020-07-31 15:32   ` Mark Rutland
  0 siblings, 1 reply; 2+ messages in thread
From: Maninder Singh @ 2020-07-31 11:49 UTC (permalink / raw)
  To: catalin.marinas, will, mark.rutland, james.morse, akpm
  Cc: v.narang, a.sahrawat, peterz, 0x7f454c46, linux-kernel,
	Maninder Singh, Dave.Martin, linux-arm-kernel

IRQ_STACK_SIZE can be made different from THREAD_SIZE,
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 <maninder1.s@samsung.com>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack
  2020-07-31 11:49 ` [PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack Maninder Singh
@ 2020-07-31 15:32   ` Mark Rutland
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Rutland @ 2020-07-31 15:32 UTC (permalink / raw)
  To: Maninder Singh
  Cc: v.narang, a.sahrawat, peterz, catalin.marinas, 0x7f454c46,
	linux-kernel, james.morse, akpm, will, Dave.Martin,
	linux-arm-kernel

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 <maninder1.s@samsung.com>

Regardless of the above, it is best to use the more specific mnemonic,
so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

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
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-31 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200731121259epcas5p11248853c0578f2e426ab828310c9e855@epcas5p1.samsung.com>
2020-07-31 11:49 ` [PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack Maninder Singh
2020-07-31 15:32   ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).