From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932227AbcFJTQ2 (ORCPT ); Fri, 10 Jun 2016 15:16:28 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:35271 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951AbcFJTQ1 (ORCPT ); Fri, 10 Jun 2016 15:16:27 -0400 Subject: Re: [PATCH v13 04/10] arm64: Blacklist non-kprobe-able symbol To: Masami Hiramatsu References: <1464924384-15269-1-git-send-email-dave.long@linaro.org> <1464924384-15269-5-git-send-email-dave.long@linaro.org> <20160604124032.94ac1bb76fde6c661e1a47a5@kernel.org> Cc: Catalin Marinas , Huang Shijie , James Morse , Marc Zyngier , Pratyush Anand , Sandeepa Prabhu , Will Deacon , William Cohen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Steve Capper , Li Bin , Adam Buchbinder , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Andrew Morton , Andrey Ryabinin , Ard Biesheuvel , Christoffer Dall , Daniel Thompson , Dave P Martin , Jens Wiklander , Jisheng Zhang , John Blackwood , Mark Rutland , Petr Mladek , Robin Murphy , Suzuki K Poulose , Vladimir Murzin , Yang Shi , Zi Shen Lim , yalin wang , Mark Brown From: David Long Message-ID: <575B1207.10003@linaro.org> Date: Fri, 10 Jun 2016 15:16:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160604124032.94ac1bb76fde6c661e1a47a5@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/2016 11:40 PM, Masami Hiramatsu wrote: > Hi David, > > On Thu, 2 Jun 2016 23:26:18 -0400 > David Long wrote: > >> From: Pratyush Anand >> >> Add all function symbols which are called from do_debug_exception under >> NOKPROBE_SYMBOL, as they can not kprobed. > > I see, but this patch should be applied after kprobes > are implemented on arm64. > I've gone back to that ordering (I think it was that way in earlier versions) but it feels odd. Wouldn't you want the unsafe symbols marked that way before turning on kprobes, like it already is in the generic kernel code? > And also, I have a comment below. > >> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c >> index 5954881..4359ca8 100644 >> --- a/arch/arm64/mm/fault.c >> +++ b/arch/arm64/mm/fault.c >> @@ -563,6 +563,7 @@ asmlinkage void __exception do_sp_pc_abort(unsigned long addr, >> info.si_addr = (void __user *)addr; >> arm64_notify_die("Oops - SP/PC alignment exception", regs, &info, esr); >> } >> +NOKPROBE_SYMBOL(do_debug_exception) > > This seems at wrong place. Please correct it in this patch. > Fixed. It was fixed in the next patch but now I've fixed it where it's introduced. > Thank you, > Thanks, -dl