From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbcCHV23 (ORCPT ); Tue, 8 Mar 2016 16:28:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47171 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747AbcCHV2X (ORCPT ); Tue, 8 Mar 2016 16:28:23 -0500 Date: Tue, 8 Mar 2016 16:28:20 -0500 From: Jessica Yu To: Jiri Kosina Cc: Josh Poimboeuf , Miroslav Benes , sjenning@redhat.com, vojtech@suse.com, pmladek@suse.cz, mpe@ellerman.id.au, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: klp: remove superfluous errors in asm/livepatch.h Message-ID: <20160308212819.GA9075@packer-debian-8-amd64.digitalocean.com> References: <1457085219-23653-1-git-send-email-mbenes@suse.cz> <20160304214500.GA8104@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Jiri Kosina [06/03/16 22:13 +0100]: >On Fri, 4 Mar 2016, Josh Poimboeuf wrote: > >> > There is an #error in asm/livepatch.h for both x86 and s390 in >> > !CONFIG_LIVEPATCH cases. It does not make much sense as pointed out by >> > Michael Ellerman. One can happily include asm/livepatch.h with >> > CONFIG_LIVEPATCH. Remove it as useless. >> > >> > Suggested-by: Michael Ellerman >> > Signed-off-by: Miroslav Benes >> >> Looks fine to me. > >Thanks. I consider this to be your Ack then :) (if you disagree, please >shout loudly). > >> While we're at it, do we even need the '#ifdef CONFIG_LIVEPATCH' in >> these files? And in include/linux/livepatch.h? > >You are right, this seems indeed completely unnecessary. I'll remove it >for 4.6 as well, if noone has any objections. Hm, I should've caught this earlier, but the notifier cleanup patch that removes the livepatch module notifier had kernel/module.c include livepatch.h for the klp_module_{coming,going} function stubs in the !CONFIG_LIVEPATCH case. See here: https://lkml.org/lkml/2016/2/8/1182 Looking back, I now don't think it makes sense for module.c to include all those livepatch definitions in the first place, since all it needed was the klp_module_{coming,going} declarations. I guess my question is, since we've removed the #ifdef CONFIG_LIVEPATCH blocks from livepatch.h, where might be a better place for the klp_module_{coming,going} stubs? Perhaps they could go in module.h instead? Jessica