From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c Date: Fri, 22 Nov 2013 13:21:19 -0800 Message-ID: <20131122212119.GE19762@tassilo.jf.intel.com> References: <20131120042148.15296.88360.stgit@kbuild-fedora.novalocal> <20131120042221.15296.85443.stgit@kbuild-fedora.novalocal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga11.intel.com ([192.55.52.93]:28007 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755248Ab3KVVVU (ORCPT ); Fri, 22 Nov 2013 16:21:20 -0500 Content-Disposition: inline In-Reply-To: <20131120042221.15296.85443.stgit@kbuild-fedora.novalocal> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Masami Hiramatsu Cc: Ingo Molnar , linux-arch@vger.kernel.org, Ananth N Mavinakayanahalli , Sandeepa Prabhu , Frederic Weisbecker , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , virtualization@lists.linux-foundation.org, Ingo Molnar , systemtap@sourceware.org, "H. Peter Anvin" , Thomas Gleixner , Seiji Aguchi , "David S. Miller" On Wed, Nov 20, 2013 at 04:22:21AM +0000, Masami Hiramatsu wrote: > Use NOKPROBE_SYMBOL macro to protect functions from kprobes > instead of __kprobes annotation in trap.c. > This also applies __always_inline annotation for some cases, > because NOKPROBE_SYMBOL() will inhibit inlining by referring > the symbol address. NOKPROBE_SYMBOL seems to add a reference from some variable to the function? With LTO we can optimize away unused functions, but not when there are references to the symbol. So this would likely prevent optimizations with LTO. I prefer a simpler "__kprobe" annotation. -Andi