Re: [PATCH v15 04/10] arm64: Kprobes with single stepping support

From: Catalin Marinas
Date: Wed Jul 20 2016 - 13:05:06 EST

On Wed, Jul 20, 2016 at 05:46:58PM +0100, Marc Zyngier wrote:
> From 0d120f95b3348e1946d8a789c7147f316c27ea6b Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <marc.zyngier@xxxxxxx>
> Date: Wed, 20 Jul 2016 17:36:42 +0100
> Subject: [PATCH] arm64: kprobes: Fix overflow when saving stack
> The MIN_STACK_SIZE macro tries evaluate how much stack space needs
> to be saved in the jprobes_stack array, sized at 128 bytes.
> When using the IRQ stack, said macro can happily return up to
> IRQ_STACK_SIZE, which is 16kB. Mayhem follows.
> This patch fixes things by getting rid of the crazy macro and
> limiting the copy to be at most the size of the jprobes_stack
> array, no matter which stack we're on.
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>

Applied to the kprobes branch. Thanks.

(I can't yet tell whether kprobes will make into 4.8; I need to run some
more tests before deciding)