From: Paul Moore <paul@paul-moore.com>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH] selinux: don't produce incorrect filename_trans_count
Date: Wed, 22 Apr 2020 15:39:43 -0400 [thread overview]
Message-ID: <CAHC9VhR5mz2WdSrqho3mn0V2qY1NosiHtaMQ-ncAbFM2+m9eGw@mail.gmail.com> (raw)
In-Reply-To: <20200420132731.1085015-1-omosnace@redhat.com>
On Mon, Apr 20, 2020 at 9:27 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> I thought I fixed the counting in filename_trans_read_helper() to count
> the compat rule count correctly in the final version, but it's still
> wrong. To really count the same thing as in the compat path, we'd need
> to add up the cardinalities of stype bitmaps of all datums.
>
> Since the kernel currently doesn't implement an ebitmap_cardinality()
> function (and computing the proper count would just waste CPU cycles
> anyway), just document that we use the field only in case of the old
> format and stop updating it in filename_trans_read_helper().
>
> Fixes: 430059024389 ("selinux: implement new format of filename transitions")
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
> security/selinux/ss/policydb.c | 11 +++--------
> security/selinux/ss/policydb.h | 3 ++-
> 2 files changed, 5 insertions(+), 9 deletions(-)
Seems reasonable. Merged into selinux/next.
--
paul moore
www.paul-moore.com
prev parent reply other threads:[~2020-04-22 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 13:27 [PATCH] selinux: don't produce incorrect filename_trans_count Ondrej Mosnacek
2020-04-22 19:39 ` 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=CAHC9VhR5mz2WdSrqho3mn0V2qY1NosiHtaMQ-ncAbFM2+m9eGw@mail.gmail.com \
--to=paul@paul-moore.com \
--cc=omosnace@redhat.com \
--cc=selinux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).