All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 3/3] xen: make available hvm_fep to non-debug build as well
Date: Thu, 23 Jun 2016 07:05:39 -0600	[thread overview]
Message-ID: <576BFAC302000078000F818A@prv-mh.provo.novell.com> (raw)
In-Reply-To: <20160623124408.GB13180@citrix.com>

>>> On 23.06.16 at 14:44, <wei.liu2@citrix.com> wrote:
> On Thu, Jun 23, 2016 at 06:20:38AM -0600, Jan Beulich wrote:
>> >>> On 23.06.16 at 12:50, <wei.liu2@citrix.com> wrote:
>> > On Wed, Jun 22, 2016 at 09:42:38AM -0600, Jan Beulich wrote:
>> >> >>> On 20.06.16 at 18:30, <wei.liu2@citrix.com> wrote:
>> >> > @@ -97,9 +98,17 @@ boolean_param("hap", opt_hap_enabled);
>> >> >  
>> >> >  #ifndef opt_hvm_fep
>> >> >  /* Permit use of the Forced Emulation Prefix in HVM guests */
>> >> > -bool_t opt_hvm_fep;
>> >> > +bool_t __read_mostly opt_hvm_fep;
>> >> >  boolean_param("hvm_fep", opt_hvm_fep);
>> >> >  #endif
>> >> > +static const char __initconst *warning_hvm_fep =
>> >> > +    "**********************************************\n"
>> >> > +    "******* WARNING: HVM FORCED EMULATION PREFIX IS AVAILABLE\n"
>> >> > +    "******* This option is *ONLY* intended to aid testing of Xen.\n"
>> >> > +    "******* It has implications on the security of the system.\n"
>> >> > +    "******* Please *DO NOT* use this in production.\n"
>> >> > +    "**********************************************\n";
>> >> > +
>> >> >  
>> >> 
>> >> Along with the same comment as on patch 2, here even more than
>> >> there I wonder whether this string wouldn't better be a static local
>> >> in hvm_enable() (or even the scope therein where warning_add()
>> >> gets invoked).
>> > 
>> > I would rather the text stays next to where the option is defined so
>> > it is obvious to anyone who touches this area of code.
>> 
>> Makes sense. But then - shouldn't it move inside the #ifndef?
>> 
> 
> That would then require the warning_add() call to be wrapped in ifdef,
> too. That looks a bit cumbersome to me.

Ah, right. Well, never mind then - the compiler will (hopefully) take
care of eliminating the unused string then.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      parent reply	other threads:[~2016-06-23 13:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 16:30 [PATCH v3 0/3] Make hvm_fep available to non-debug build Wei Liu
2016-06-20 16:30 ` [PATCH v3 1/3] xen: add warning infrastructure Wei Liu
2016-06-22 15:35   ` Jan Beulich
2016-06-23 10:37     ` Wei Liu
2016-06-23 11:17       ` Wei Liu
2016-06-23 11:21         ` Andrew Cooper
2016-06-23 12:18         ` Jan Beulich
2016-06-20 16:30 ` [PATCH v3 2/3] console: use warning infrastructure for sync console warning Wei Liu
2016-06-22 15:37   ` Jan Beulich
2016-06-23 10:45     ` Wei Liu
2016-06-20 16:30 ` [PATCH v3 3/3] xen: make available hvm_fep to non-debug build as well Wei Liu
2016-06-22 15:42   ` Jan Beulich
2016-06-23 10:50     ` Wei Liu
2016-06-23 12:20       ` Jan Beulich
2016-06-23 12:44         ` Wei Liu
2016-06-23 12:48           ` Andrew Cooper
2016-06-23 12:50             ` Wei Liu
2016-06-23 13:05           ` Jan Beulich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576BFAC302000078000F818A@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.