From: Paul Moore <pmoore@redhat.com>
To: Huw Davies <huw@codeweavers.com>
Cc: netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
selinux@tycho.nsa.gov
Subject: Re: [RFC PATCH v2 06/18] netlabel: Add support for creating a CALIPSO protocol domain mapping.
Date: Sun, 07 Feb 2016 14:56:01 -0500 [thread overview]
Message-ID: <1869616.Jjv9uvE9Ou@sifl> (raw)
In-Reply-To: <1452246774-13241-7-git-send-email-huw@codeweavers.com>
On Friday, January 08, 2016 09:52:42 AM Huw Davies wrote:
> This extends the NLBL_MGMT_C_ADD and NLBL_MGMT_C_ADDDEF commands
> to accept CALIPSO protocol DOIs.
>
> Signed-off-by: Huw Davies <huw@codeweavers.com>
...
> @@ -300,6 +311,11 @@ static int netlbl_domhsh_validate(const struct
> netlbl_dom_map *entry) entry->def.cipso == NULL)
> return -EINVAL;
> break;
In netlbl_domhsh_validate() you should also check to ensure that entry-
>def.calipso is NULL in the NETLBL_NLTYPE_UNLABELED case similar to what we do
for CIPSO.
> @@ -233,6 +252,9 @@ static int netlbl_mgmt_add_common(struct genl_info
> *info, map->list.valid = 1;
> map->def.type = entry->def.type;
>
> + if (calipso)
> + map->def.calipso = calipso;
> +
This is another nit-picky comment, and I'll only mention it this one time, but
there are a number of places in this patchset where I think you are adding
undesirable vertical whitespace. In the if-block above, the whitespace above
the "if (calipso)" line is inconsistent with other similar parts of the
function (e.g. the CIPSO based code) and doesn't make the code any easier to
read.
I mention this not because such things are grounds for NACK'ing a patch, but
just something to make note of and fix if you happen to be updating the
patch(set) anyway.
> ret_val = netlbl_af6list_add(&map->list, &addrmap->list6);
> if (ret_val != 0) {
> kfree(map);
--
paul moore
security @ redhat
prev parent reply other threads:[~2016-02-07 19:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 9:52 [RFC PATCH v2 06/18] netlabel: Add support for creating a CALIPSO protocol domain mapping Huw Davies
2016-02-07 19:56 ` Paul Moore [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=1869616.Jjv9uvE9Ou@sifl \
--to=pmoore@redhat.com \
--cc=huw@codeweavers.com \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=selinux@tycho.nsa.gov \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox