From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754991AbcGTRFC (ORCPT ); Wed, 20 Jul 2016 13:05:02 -0400 Received: from foss.arm.com ([217.140.101.70]:43705 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754795AbcGTREl (ORCPT ); Wed, 20 Jul 2016 13:04:41 -0400 Date: Wed, 20 Jul 2016 18:04:33 +0100 From: Catalin Marinas To: Marc Zyngier Cc: Mark Rutland , Petr Mladek , Zi Shen Lim , Will Deacon , Andrey Ryabinin , yalin wang , Li Bin , John Blackwood , Pratyush Anand , Daniel Thompson , David Long , Huang Shijie , Dave P Martin , Jisheng Zhang , Vladimir Murzin , Steve Capper , Suzuki K Poulose , Yang Shi , Mark Brown , Sandeepa Prabhu , William Cohen , Alex =?iso-8859-1?Q?Benn=E9e?= , Adam Buchbinder , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , linux-kernel@vger.kernel.org, James Morse , Masami Hiramatsu , Andrew Morton , Robin Murphy , Jens Wiklander , Christoffer Dall Subject: Re: [PATCH v15 04/10] arm64: Kprobes with single stepping support Message-ID: <20160720170432.GH25890@e104818-lin.cambridge.arm.com> References: <1467995754-32508-1-git-send-email-dave.long@linaro.org> <1467995754-32508-5-git-send-email-dave.long@linaro.org> <578FA238.3050206@arm.com> <20160720162827.GF25890@e104818-lin.cambridge.arm.com> <578FAB02.90707@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <578FAB02.90707@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 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