Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750845AbaKURfx (ORCPT ); Fri, 21 Nov 2014 12:35:53 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:34997 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750699AbaKURfw (ORCPT ); Fri, 21 Nov 2014 12:35:52 -0500 Message-ID: <546F77F3.3050002@suse.cz> Date: Fri, 21 Nov 2014 18:35:47 +0100 From: Jiri Slaby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Seth Jennings , Jiri Kosina CC: Josh Poimboeuf , Vojtech Pavlik , Steven Rostedt , Petr Mladek , Miroslav Benes , Christoph Hellwig , Greg KH , Andy Lutomirski , Masami Hiramatsu , live-patching@vger.kernel.org, x86@kernel.org, kpatch@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 2/3] kernel: add support for live patching References: <1416522580-5593-1-git-send-email-sjenning@redhat.com> <1416522580-5593-3-git-send-email-sjenning@redhat.com> <20141121164027.GB11339@cerebellum.variantweb.net> In-Reply-To: <20141121164027.GB11339@cerebellum.variantweb.net> 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 On 11/21/2014, 05:40 PM, Seth Jennings wrote: >>> --- /dev/null >>> +++ b/arch/x86/include/asm/livepatch.h >>> @@ -0,0 +1,37 @@ ... >>> +#ifndef _ASM_X86_LIVEPATCH_H >>> +#define _ASM_X86_LIVEPATCH_H >>> + >>> +#include >>> + >>> +#ifdef CONFIG_LIVE_PATCHING >>> +extern int klp_write_module_reloc(struct module *mod, unsigned long type, >>> + unsigned long loc, unsigned long value); >>> + >>> +#else >>> +static int klp_write_module_reloc(struct module *mod, unsigned long type, >> >> static inline? > > I think the practice is to let the compiler handle inline determination > unless you are sure that the compiler isn't inlining something you think > it should. Although you are right, it is a correct C, gcc specs (6.39) suggests to use 'static inline' on such functions. gcc then shall inline such functions. And if you look around in the kernel, we use that combination almost everywhere. thanks, -- js suse labs -- 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/