mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Elena Reshetova <elena.reshetova@intel.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	gregkh@linuxfoundation.org, ebiederm@xmission.com,
	mingo@redhat.com, adobriyan@gmail.com, serge@hallyn.com,
	arozansk@redhat.com, dave@stgolabs.net
Subject: Re: [PATCH 0/3] ipc subsystem refcounter conversions
Date: Fri, 3 Mar 2017 16:23:52 -0800	[thread overview]
Message-ID: <20170303162352.b6af1c0c3115b3f5f1e7aed3@linux-foundation.org> (raw)
In-Reply-To: <1487590189-18151-1-git-send-email-elena.reshetova@intel.com>

On Mon, 20 Feb 2017 13:29:46 +0200 Elena Reshetova <elena.reshetova@intel.com> wrote:

> Now when new refcount_t type and API are finally merged
> (see include/linux/refcount.h), the following
> patches convert various refcounters in the ipc susystem from atomic_t
> to refcount_t. By doing this we prevent intentional or accidental
> underflows or overflows that can led to use-after-free vulnerabilities.
> 
> The below patches are fully independent and can be cherry-picked separately.
> Since we convert all kernel subsystems in the same fashion, resulting
> in about 300 patches, we have to group them for sending at least in some
> fashion to be manageable. Please excuse the long cc list.

Again, the refcount_t operations are much more expensive than the bare
atomic_t operations.  I'm reluctant to merge any of these conversions
without either

a) a convincing demonstration that the performance impact is
   sufficiently small (ie: unmeasurable) or

b) a compile-time option to disable the refcount_t operations (make
   them generate the same code as the bare atomic_t ops).  Along with
   some suitably reliable means of preventing people from accidentally
   enabling the debug code in production builds.

  parent reply	other threads:[~2017-03-04  0:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 11:29 Elena Reshetova
2017-02-20 11:29 ` [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t Elena Reshetova
2017-05-27 19:41   ` Kees Cook
2017-05-28 12:10     ` Manfred Spraul
2017-02-20 11:29 ` [PATCH 2/3] ipc: convert sem_undo_list.refcnt " Elena Reshetova
2017-05-27 19:44   ` Kees Cook
2017-02-20 11:29 ` [PATCH 3/3] ipc: convert ipc_rcu.refcount " Elena Reshetova
2017-05-27 19:47   ` Kees Cook
2017-02-20 11:42 ` [PATCH 0/3] ipc subsystem refcounter conversions Andy Shevchenko
2017-02-20 12:30   ` Reshetova, Elena
2017-02-22 15:41 ` Davidlohr Bueso
2017-03-04  0:23 ` Andrew Morton [this message]
2017-03-06  9:51   ` Reshetova, Elena
2017-05-27 19:58   ` Kees Cook
2017-05-29  8:39     ` Christoph Hellwig
2017-05-29  9:11       ` Eric W. Biederman
2017-05-29 10:24         ` Peter Zijlstra
2017-05-29 10:49           ` Eric W. Biederman
2017-05-29 11:30             ` Eric W. Biederman
2017-05-29 11:39               ` Eric W. Biederman
2017-05-29 12:23                 ` Peter Zijlstra
2017-05-29 15:43                   ` Peter Zijlstra
2017-05-29 12:13             ` Peter Zijlstra

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=20170303162352.b6af1c0c3115b3f5f1e7aed3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=arozansk@redhat.com \
    --cc=dave@stgolabs.net \
    --cc=ebiederm@xmission.com \
    --cc=elena.reshetova@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=serge@hallyn.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®