From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbdBTLGa (ORCPT ); Mon, 20 Feb 2017 06:06:30 -0500 Received: from mga02.intel.com ([134.134.136.20]:57934 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbdBTLG2 (ORCPT ); Mon, 20 Feb 2017 06:06:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,186,1484035200"; d="scan'208";a="826325696" From: Elena Reshetova To: linux-kernel@vger.kernel.org Cc: linux-edac@vger.kernel.org, x86@kernel.org, sparclinux@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, peterz@infradead.org, gregkh@linuxfoundation.org, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, tony.luck@intel.com, hpa@zytor.com, Elena Reshetova Subject: [PATCH 0/4] arch subsystem refcounter conversions Date: Mon, 20 Feb 2017 13:06:17 +0200 Message-Id: <1487588781-15123-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 Now when new refcount_t type and API are finally merged (see include/linux/refcount.h), the following patches convert various refcounters in the arch 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 (4): s390: convert debug_info.ref_count from atomic_t to refcount_t x86: convert threshold_bank.cpus from atomic_t to refcount_t sparc: convert mdesc_handle.refcnt from atomic_t to refcount_t kvm: convert kvm.users_count from atomic_t to refcount_t arch/s390/include/asm/debug.h | 3 ++- arch/s390/kernel/debug.c | 8 ++++---- arch/sparc/kernel/mdesc.c | 17 +++++++++-------- arch/x86/include/asm/amd_nb.h | 3 ++- arch/x86/kernel/cpu/mcheck/mce_amd.c | 6 +++--- include/linux/kvm_host.h | 3 ++- virt/kvm/kvm_main.c | 8 ++++---- 7 files changed, 26 insertions(+), 22 deletions(-) -- 2.7.4