linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3]  v2 ipc subsystem refcount coversions
@ 2017-07-07  8:59 Elena Reshetova
  2017-07-07  8:59 ` [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t Elena Reshetova
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Elena Reshetova @ 2017-07-07  8:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, gregkh, akpm, ebiederm, mingo, adobriyan, serge,
	arozansk, dave, keescook, Elena Reshetova

Changes in v2:
 * add a new patch on kern_ipc_perm.refcount
 * drop the patch on ipc_rcu.refcount
 * rebase on top of linux-next/master
 * Now by default refcount_t = atomic_t (*) and uses all atomic
   standard operations unless CONFIG_REFCOUNT_FULL is enabled.
   This is a compromise for the systems that are critical on
   performance (such as net) and cannot accept even slight delay
   on the refcounter operations.

This series, for ipc subsystem components, replaces atomic_t reference
counters with the new refcount_t type and API (see include/linux/refcount.h).
By doing this we prevent intentional or accidental
underflows or overflows that can led to use-after-free vulnerabilities.

The patches are fully independent and can be cherry-picked separately.
If there are no objections to the patches, please merge them via respective trees.

* The respective change is currently merged into -next as
  "locking/refcount: Create unchecked atomic_t implementation".

Elena Reshetova (3):
  ipc: convert ipc_namespace.count from atomic_t to refcount_t
  ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t
  ipc: convert kern_ipc_perm.refcount from atomic_t to refcount_t

 include/linux/ipc.h           | 3 ++-
 include/linux/ipc_namespace.h | 5 +++--
 ipc/msgutil.c                 | 2 +-
 ipc/namespace.c               | 4 ++--
 ipc/sem.c                     | 8 ++++----
 ipc/util.c                    | 6 +++---
 6 files changed, 15 insertions(+), 13 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH 0/3] ipc subsystem refcounter conversions
@ 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
  0 siblings, 1 reply; 26+ messages in thread
From: Elena Reshetova @ 2017-02-20 11:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, gregkh, akpm, ebiederm, mingo, adobriyan, serge,
	arozansk, dave, Elena Reshetova

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.

Elena Reshetova (3):
  ipc: convert ipc_namespace.count from atomic_t to refcount_t
  ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t
  ipc: convert ipc_rcu.refcount from atomic_t to refcount_t

 include/linux/ipc_namespace.h | 5 +++--
 ipc/msgutil.c                 | 2 +-
 ipc/namespace.c               | 4 ++--
 ipc/sem.c                     | 8 ++++----
 ipc/util.c                    | 6 +++---
 ipc/util.h                    | 3 ++-
 6 files changed, 15 insertions(+), 13 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-07-20 15:12 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07  8:59 [PATCH 0/3] v2 ipc subsystem refcount coversions Elena Reshetova
2017-07-07  8:59 ` [PATCH 1/3] ipc: convert ipc_namespace.count from atomic_t to refcount_t Elena Reshetova
2017-07-09 21:59   ` Eric W. Biederman
2017-07-10  6:48     ` Reshetova, Elena
2017-07-10  8:37       ` Eric W. Biederman
2017-07-10  9:34         ` Alexey Dobriyan
2017-07-10 11:19           ` Eric W. Biederman
2017-07-10  9:56         ` Reshetova, Elena
2017-07-10 11:26           ` Eric W. Biederman
2017-07-10 12:11             ` Reshetova, Elena
2017-07-10 20:32               ` Eric W. Biederman
2017-07-12  9:21                 ` Reshetova, Elena
2017-07-19 22:35     ` Andrew Morton
2017-07-19 22:54       ` Davidlohr Bueso
2017-07-19 22:58         ` Andrew Morton
2017-07-19 23:11           ` Davidlohr Bueso
2017-07-19 23:20             ` Kees Cook
2017-07-20  0:32               ` Kees Cook
2017-07-20  9:34           ` Ingo Molnar
2017-07-20 12:34             ` Eric W. Biederman
2017-07-20 15:12               ` Kees Cook
2017-07-07  8:59 ` [PATCH 2/3] ipc: convert sem_undo_list.refcnt " Elena Reshetova
2017-07-07  8:59 ` [PATCH 3/3] ipc: convert kern_ipc_perm.refcount " Elena Reshetova
  -- strict thread matches above, loose matches on Subject: below --
2017-02-20 11:29 [PATCH 0/3] ipc subsystem refcounter conversions 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

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).