From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754468AbdFNHYo (ORCPT ); Wed, 14 Jun 2017 03:24:44 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:34572 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbdFNHYm (ORCPT ); Wed, 14 Jun 2017 03:24:42 -0400 Subject: Re: [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist To: Josh Poimboeuf , x86@kernel.org Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra References: <1c982a42e4d2b9b3a4aa76bf0a0437842bbdf718.1496293620.git.jpoimboe@redhat.com> From: Jiri Slaby Message-ID: Date: Wed, 14 Jun 2017 09:24:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1c982a42e4d2b9b3a4aa76bf0a0437842bbdf718.1496293620.git.jpoimboe@redhat.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2017, 07:44 AM, Josh Poimboeuf wrote: ... > --- a/arch/x86/kernel/kprobes/opt.c > +++ b/arch/x86/kernel/kprobes/opt.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -94,6 +95,7 @@ static void synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val) > } > > asm ( > + "optprobe_template_func:\n" Why do you add another symbol here? What's wrong with optprobe_template_entry? > ".global optprobe_template_entry\n" > "optprobe_template_entry:\n" > #ifdef CONFIG_X86_64 > @@ -131,7 +133,12 @@ asm ( > " popf\n" > #endif > ".global optprobe_template_end\n" > - "optprobe_template_end:\n"); > + "optprobe_template_end:\n" > + ".type optprobe_template_func, @function\n" > + ".size optprobe_template_func, .-optprobe_template_func\n"); > + > +void optprobe_template_func(void); > +STACK_FRAME_NON_STANDARD(optprobe_template_func); > > #define TMPL_MOVE_IDX \ > ((long)&optprobe_template_val - (long)&optprobe_template_entry) thanks, -- js suse labs