From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: eddie.dong@intel.com, Feng Wu <feng.wu@intel.com>,
Ian.Campbell@citrix.com, jun.nakajima@intel.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v1 3/6] x86: Enable Supervisor Mode Execution Prevention (SMAP) for Xen
Date: Tue, 15 Apr 2014 14:46:42 +0100 [thread overview]
Message-ID: <534D3842.70107@citrix.com> (raw)
In-Reply-To: <534D38B80200007800008F70@nat28.tlf.novell.com>
On 15/04/14 12:48, Jan Beulich wrote:
>>>> On 15.04.14 at 12:32, <andrew.cooper3@citrix.com> wrote:
>> On 15/04/14 14:01, Feng Wu wrote:
>>> index e9c2c51..09c974d 100644
>>> --- a/xen/arch/x86/setup.c
>>> +++ b/xen/arch/x86/setup.c
>>> @@ -61,6 +61,10 @@ integer_param("maxcpus", max_cpus);
>>> static bool_t __initdata disable_smep;
>>> invbool_param("smep", disable_smep);
>>>
>>> +/* smap: Enable/disable Supervisor Mode Access Prevention (default on). */
>>> +static bool_t __initdata disable_smap;
>>> +invbool_param("smap", disable_smap);
>>> +
>> Please use a positive boolean rather than negative. Convention is also
>> to prefix the variable with opt_
>>
>> static bool_t __initdata opt_smap = 1;
>> boolean_param("smap", opt_smap);
> Hmm, I'd go for consistency with SMAP here as a first step.
> Converting both may later be an option, but I'm not really sure
> why you think the invbool_param() is bad.
>
> Jan
>
Not invbool_param() per say, but with negative booleans in general. It
is just unnecessary extra cognitive load when following code. This is
admittedly a mild example.
~Andrew
next prev parent reply other threads:[~2014-04-15 13:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 13:01 [PATCH v1 3/6] x86: Enable Supervisor Mode Execution Prevention (SMAP) for Xen Feng Wu
2014-04-15 5:36 ` Wu, Feng
2014-04-15 10:32 ` Andrew Cooper
2014-04-15 11:48 ` Jan Beulich
2014-04-15 13:46 ` Andrew Cooper [this message]
2014-04-16 2:20 ` Wu, Feng
2014-04-16 9:10 ` Andrew Cooper
2014-04-16 9:14 ` Jan Beulich
2014-04-15 14:00 ` Andrew Cooper
2014-04-15 14:09 ` Andrew Cooper
2014-04-15 14:16 ` Jan Beulich
2014-04-15 14:26 ` Andrew Cooper
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=534D3842.70107@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=feng.wu@intel.com \
--cc=jun.nakajima@intel.com \
--cc=xen-devel@lists.xen.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.