From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>,
sashal@kernel.org, James Morris <jmorris@namei.org>,
selinux@vger.kernel.org
Subject: Re: [PATCH v2] selinux: Add helper functions to get and set checkreqprot
Date: Fri, 11 Sep 2020 07:20:14 -0700 [thread overview]
Message-ID: <a09f9a78-a8ee-5b13-c4d9-e939a4edeb5c@linux.microsoft.com> (raw)
In-Reply-To: <CAHC9VhSZiuHHg+oJPcaRLoZaDhARgiJ2PN5LiMHcVk1yB0a+ng@mail.gmail.com>
On 9/11/20 7:07 AM, Paul Moore wrote:
>>
>> +static inline bool checkreqprot_enabled(const struct selinux_state *state)
>> +{
>> + return READ_ONCE(state->checkreqprot);
>> +}
>> +
>> +static inline void checkreqprot_set(struct selinux_state *state, bool value)
>> +{
>> + WRITE_ONCE(state->checkreqprot, value);
>> +}
>
> This is a nitpick, and I recognize that Stephen already suggested the
> use of "*_set()" and "*_enabled()" for names, but if we are going to
> name the setter "*_set()" let's also name the getter "*_get()".
>
> Other than that, it looks fine to me.
>
Sure - I can do that.
Are you expecting something like below (for checkreqprot and enforcing)?
s/checkreqprot_enabled/checkreqprot_get/
s/enforcing_enabled/enforcing_get/
-lakshmi
next prev parent reply other threads:[~2020-09-11 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 22:28 [PATCH v2] selinux: Add helper functions to get and set checkreqprot Lakshmi Ramasubramanian
2020-09-10 12:41 ` Stephen Smalley
2020-09-11 14:07 ` Paul Moore
2020-09-11 14:20 ` Lakshmi Ramasubramanian [this message]
2020-09-11 14:42 ` Paul Moore
2020-09-11 14:22 ` Stephen Smalley
2020-09-11 14:52 ` Paul Moore
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=a09f9a78-a8ee-5b13-c4d9-e939a4edeb5c@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=jmorris@namei.org \
--cc=paul@paul-moore.com \
--cc=sashal@kernel.org \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/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.