From: Jonathan Creekmore Subject: Re: [PATCH] x86: wrap kexec feature with CONFIG_KEXEC Date: Thu, 27 Aug 2015 10:44:21 -0500 Message-ID: References: <1440686870-19104-1-git-send-email-jonathan.creekmore@gmail.com> <55DF2C57.8030100@citrix.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZUzLl-0008NR-3I for xen-devel@lists.xenproject.org; Thu, 27 Aug 2015 15:44:25 +0000 Received: by qgeb6 with SMTP id b6so12942878qge.3 for ; Thu, 27 Aug 2015 08:44:22 -0700 (PDT) In-Reply-To: <55DF2C57.8030100@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, keir@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org > On Aug 27, 2015, at 10:27 AM, David Vrabel wrote: > > On 27/08/15 15:47, Jonathan Creekmore wrote: >> Add the appropriate #if checks around the kexec code in the x86 codebase >> so that the feature can actually be turned off by the flag instead of >> always required to be enabled on x86. > > What's your use case for this? > The use case is for a slimmed down version of the hypervisor that can be used as a security hypervisor, exposing as little extra functionality as possible. When looking for features to trim out to reduce the attack surface, I saw the flag for KEXEC and wanted to disable that, then ran into compile problems. > I think you should consider providing empty stub functions for !KEXEC > instead of all the #ifdefs. > Good points, all, who mentioned the empty stub functions. I am revising it now to use stubs instead of all of the #ifdefs. > >> --- a/xen/include/asm-x86/config.h >> +++ b/xen/include/asm-x86/config.h >> @@ -1,6 +1,6 @@ >> /****************************************************************************** >> * config.h >> - * >> + * >> * A Linux-style configuration list. >> */ > > Stray whitespace change. I guess I really need to just turn off that feature (stripping trailing whitespace) in my editor. So useful when writing new code, not as helpful when trying to modify existing code.