From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbdFNNDt (ORCPT ); Wed, 14 Jun 2017 09:03:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752587AbdFNNDd (ORCPT ); Wed, 14 Jun 2017 09:03:33 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 918AC80F99 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 918AC80F99 Date: Wed, 14 Jun 2017 08:03:20 -0500 From: Josh Poimboeuf To: Jiri Slaby Cc: x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra Subject: Re: [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist Message-ID: <20170614130320.f2qhtuz5xuhftzw7@treble> References: <1c982a42e4d2b9b3a4aa76bf0a0437842bbdf718.1496293620.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 14 Jun 2017 13:03:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 14, 2017 at 09:24:39AM +0200, Jiri Slaby wrote: > 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? I tried to do that, but the STACK_FRAME_NON_STANDARD macro needs a function, and optprobe_template_entry is defined elsewhere as a data symbol with a type of kprobe_opcode_t. So I had to wrap the asm code inside a function. -- Josh