All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>,
	selinux@vger.kernel.org
Subject: Re: [PATCH v4] selinux: Add helper functions to get and set checkreqprot
Date: Tue, 15 Sep 2020 14:38:35 -0400	[thread overview]
Message-ID: <CAHC9VhSYY03rkNsijouC3xAR23hvNNFwtvAB2_YFeDMVvdLj9w@mail.gmail.com> (raw)
In-Reply-To: <20200914173157.4655-1-nramas@linux.microsoft.com>

On Mon, Sep 14, 2020 at 1:32 PM Lakshmi Ramasubramanian
<nramas@linux.microsoft.com> wrote:
>
> checkreqprot data member in selinux_state struct is accessed directly by
> SELinux functions to get and set. This could cause unexpected read or
> write access to this data member due to compiler optimizations and/or
> compiler's reordering of access to this field.
>
> Add helper functions to get and set checkreqprot data member in
> selinux_state struct. These helper functions use READ_ONCE and
> WRITE_ONCE macros to ensure atomic read or write of memory for
> this data member.
>
> Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
> Suggested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
> Suggested-by: Paul Moore <paul@paul-moore.com>
> ---
>  security/selinux/hooks.c            |  6 +++---
>  security/selinux/include/security.h | 10 ++++++++++
>  security/selinux/selinuxfs.c        |  5 +++--
>  3 files changed, 16 insertions(+), 5 deletions(-)

Merged into selinux/next, thanks Lakshmi!

-- 
paul moore
www.paul-moore.com

      parent reply	other threads:[~2020-09-15 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 17:31 [PATCH v4] selinux: Add helper functions to get and set checkreqprot Lakshmi Ramasubramanian
2020-09-14 17:46 ` Stephen Smalley
2020-09-15 18:38 ` 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=CAHC9VhSYY03rkNsijouC3xAR23hvNNFwtvAB2_YFeDMVvdLj9w@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=nramas@linux.microsoft.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.