From: Kees Cook <keescook@chromium.org>
To: Jann Horn <jannh@google.com>
Cc: Ondrej Mosnacek <omosnace@redhat.com>,
NitinGote <nitin.r.gote@intel.com>,
Kernel Hardening <kernel-hardening@lists.openwall.com>,
Paul Moore <paul@paul-moore.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
Eric Paris <eparis@parisplace.org>,
SElinux list <selinux@vger.kernel.org>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] selinux: convert struct sidtab count to refcount_t
Date: Wed, 24 Jul 2019 08:54:02 -0700 [thread overview]
Message-ID: <201907240852.6D10622B2@keescook> (raw)
In-Reply-To: <CAG48ez2eXJwE+vS2_ahR9Vuc3qD8O4CDZ5Lh6DcrrOq+7VKOYQ@mail.gmail.com>
On Wed, Jul 24, 2019 at 04:28:31PM +0200, Jann Horn wrote:
> On Wed, Jul 24, 2019 at 12:17 AM Kees Cook <keescook@chromium.org> wrote:
> > Perhaps we need a "statistics" counter type for these kinds of counters?
> > "counter_t"? I bet there are a lot of atomic_t uses that are just trying
> > to be counters. (likely most of atomic_t that isn't now refcount_t ...)
>
> This isn't a statistics counter though; this thing needs ordered
> memory accesses, which you wouldn't need for statistics.
Okay, it'd be a "very accurate" counter type? It _could_ be used for
statistics. I guess what I mean is that there are a lot of places using
atomic_t just for upward counting that don't care about wrapping, etc.
--
Kees Cook
next prev parent reply other threads:[~2019-07-24 15:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 11:31 [PATCH] selinux: convert struct sidtab count to refcount_t NitinGote
2019-07-22 13:17 ` Ondrej Mosnacek
2019-07-23 0:25 ` Paul Moore
2019-07-23 5:44 ` Gote, Nitin R
2019-07-23 14:53 ` Jann Horn
2019-07-23 22:17 ` Kees Cook
2019-07-24 14:28 ` Jann Horn
2019-07-24 15:54 ` Kees Cook [this message]
2019-07-24 16:55 ` Jann Horn
2019-07-29 16:51 ` Kees Cook
2019-07-24 16:17 ` Ondrej Mosnacek
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=201907240852.6D10622B2@keescook \
--to=keescook@chromium.org \
--cc=eparis@parisplace.org \
--cc=jannh@google.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nitin.r.gote@intel.com \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=sds@tycho.nsa.gov \
--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).