Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbbGUKT2 (ORCPT ); Tue, 21 Jul 2015 06:19:28 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:35918 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753732AbbGUKT0 (ORCPT ); Tue, 21 Jul 2015 06:19:26 -0400 Message-ID: <55AE1CA7.7010200@hitachi.com> Date: Tue, 21 Jul 2015 19:19:19 +0900 From: Masami Hiramatsu Organization: Hitachi, Ltd., Japan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ingo Molnar CC: Pratyush Anand , Ananth N Mavinakayanahalli , Rusty Russell , Linux Kernel Mailing List , Ingo Molnar , Rob Landley , "H. Peter Anvin" , Thomas Gleixner , "David S. Miller" Subject: Re: Re: [PATCH tip/master 1/3] kprobes: Support blacklist functions in module References: <20150716071053.14218.82072.stgit@localhost.localdomain> <20150716071055.14218.64129.stgit@localhost.localdomain> <20150717121037.GA9437@gmail.com> <55AB166B.9040509@hitachi.com> <20150721074847.GA25542@gmail.com> In-Reply-To: <20150721074847.GA25542@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1684 Lines: 39 On 2015/07/21 16:48, Ingo Molnar wrote: > * Masami Hiramatsu wrote: > >> For some symbols we can do that. But it can conflict with other __section >> attributes e.g. __sched, since a function must be placed in only one >> section. [...] > > The the scheduler is not modular, so __sched should not be a problem in itself. No, I meant why I chose this macro, itself should not be a section. Or would we better use __nokprobe in module and NOKPROBE_SYMBOL in kernel? :( >> [...] So, IMHO, using section for expressing its attribute is not a good idea, >> but I couldn't find another option in common function attribute. >> >> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes >> >> Thus I've introduced NOKPROBE_SYMBOL macro which stores the target function >> addresses (not the function itself) in the _kprobe_blacklist section. > > So the question is, in which cases do modules need this? The main reason for this is to put the kprobes handlers (and the functions called from the kprobe handlers) on the blacklist. And also, there may be some cases which NMI handlers can be in modules (as setting kconfig "m"). Thank you, -- Masami HIRAMATSU Linux Technology Research Center, System Productivity Research Dept. Center for Technology Innovation - Systems Engineering Hitachi, Ltd., Research & Development Group E-mail: masami.hiramatsu.pt@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/