Commit 72714377 authored by Marc Zyngier's avatar Marc Zyngier Committed by Amit Pundir
Browse files

UPSTREAM: 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: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit ab4c1325)
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
parent 9ef639d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment