Thread (71 messages) 71 messages, 10 authors, 2016-08-10

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

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2016-07-20 17:05:02
Also in: lkml

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 <redacted>
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 <redacted>
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)

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help