Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537AbdGGJAA (ORCPT ); Fri, 7 Jul 2017 05:00:00 -0400 Received: from mga02.intel.com ([134.134.136.20]:55349 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbdGGI76 (ORCPT ); Fri, 7 Jul 2017 04:59:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,321,1496127600"; d="scan'208";a="284084728" From: Elena Reshetova To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, ebiederm@xmission.com, mingo@redhat.com, adobriyan@gmail.com, serge@hallyn.com, arozansk@redhat.com, dave@stgolabs.net, keescook@chromium.org, Elena Reshetova Subject: [PATCH 0/3] v2 ipc subsystem refcount coversions Date: Fri, 7 Jul 2017 11:59:49 +0300 Message-Id: <1499417992-3238-1-git-send-email-elena.reshetova@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1496 Lines: 36 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