All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: selinux@vger.kernel.org,
	Stephen Smalley <stephen.smalley.work@gmail.com>
Subject: Re: [PATCH v3] selinux: simplify away security_policydb_len()
Date: Mon, 31 Aug 2020 10:03:57 -0400	[thread overview]
Message-ID: <CAHC9VhTkgZ65=xHtkpRWZkNp9vu512g9BoAa8VfEHsYsvDxtiA@mail.gmail.com> (raw)
In-Reply-To: <20200827162753.2089782-1-omosnace@redhat.com>

On Thu, Aug 27, 2020 at 12:28 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> Remove the security_policydb_len() calls from sel_open_policy() and
> instead update the inode size from the size returned from
> security_read_policy().
>
> Since after this change security_policydb_len() is only called from
> security_load_policy(), remove it entirely and just open-code it there.
>
> Also, since security_load_policy() is always called with policy_mutex
> held, make it dereference the policy pointer directly and drop the
> unnecessary RCU locking.
>
> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
> ---
>
> v3: rebase on top of latest selinux/next
>
>  security/selinux/include/security.h |  1 -
>  security/selinux/selinuxfs.c        | 12 ++++++------
>  security/selinux/ss/services.c      | 27 ++++-----------------------
>  3 files changed, 10 insertions(+), 30 deletions(-)

Merged into selinux/next.

-- 
paul moore
www.paul-moore.com

      parent reply	other threads:[~2020-08-31 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 16:27 [PATCH v3] selinux: simplify away security_policydb_len() Ondrej Mosnacek
2020-08-27 16:33 ` Stephen Smalley
2020-08-31 14:03 ` 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='CAHC9VhTkgZ65=xHtkpRWZkNp9vu512g9BoAa8VfEHsYsvDxtiA@mail.gmail.com' \
    --to=paul@paul-moore.com \
    --cc=omosnace@redhat.com \
    --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.