Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3075896imu; Fri, 18 Jan 2019 04:29:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN7vfjnNpP9Brb3lKvwxMeImTOqT0y8GoWW3YQmzBud8A2s4FwhWf81kS7iGKGRjdhFYN7LL X-Received: by 2002:a17:902:6b09:: with SMTP id o9mr18973545plk.208.1547814564815; Fri, 18 Jan 2019 04:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547814564; cv=none; d=google.com; s=arc-20160816; b=nnol6G1CPzwZrrx4mAcsKpj1+aufvvdYDp/dG2fMjaDmEt4hHMSjpVrKBUC1iUf7pN H06BrJjsH792JwXgnydHUNGK3VFYQlwj4DbvwnEBJgI16y+DXxShKk72N6Hld96gaUgG /AHaMesSr1dejxWbczy7elvYzjtZXX48eMlT683XyyXIkydN6pPmQuw0SsfHMwKGKQPn 2SzUoH0gC/KKYgACfjXXNuSGC5cRyBgIdZohBV6u15xTcW0AC3lzTFtJ+wRJwjSWlwpM MvokSf+fKl42UHp7kvrj1kuByYhD7tF16dHmT+Rosjrux1KuvHhJ4i+BAH5qKCDuKKGC gIHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=35djvLM/s8MCClTVf8yAYBzWkrIp55IRzME8JUiWH7c=; b=z3hNbH1mLE0qcbSaJE0TG8avcZdAirFWAcA7j5ltxuNKiZi3eqMkTjYB+FdTseGPWB +dPlKnIHQ4bAj+SHRTXx5eoW3qQiXhqpODQdNfHKoR6EV73bhDmcksRzxoASk4MSRf+g /N7TJEF4U3AJkzWAPK+kcBqDkGGq2JubOJm8D1q5zSHb0DBcMeqAlB8pDTC1euxNMtw0 vRIJ+qeBTw4EeAIVl6i8zONiuEe34iXQbIH0ySkuIAxj+38O+3Kz8NXuOBJ6dJCKI5lp kO4PdhozBaU7R/6wakNLnXf+UGtcHlNAiGvbQncXf4HWJy8OOIxE3KRYhyTlQdzvrkWN skQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59si4422192ple.291.2019.01.18.04.29.06; Fri, 18 Jan 2019 04:29:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727520AbfARM1p (ORCPT + 99 others); Fri, 18 Jan 2019 07:27:45 -0500 Received: from mga05.intel.com ([192.55.52.43]:2175 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbfARM1p (ORCPT ); Fri, 18 Jan 2019 07:27:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 04:27:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,491,1539673200"; d="scan'208";a="268136099" Received: from elena-thinkpad-x230.fi.intel.com ([10.237.68.34]) by orsmga004.jf.intel.com with ESMTP; 18 Jan 2019 04:27:41 -0800 From: Elena Reshetova To: mingo@redhat.com Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, keescook@chromium.org, tglx@linutronix.de, Elena Reshetova Subject: [PATCH 0/5] sched refcount_t conversions Date: Fri, 18 Jan 2019 14:27:25 +0200 Message-Id: <1547814450-18902-1-git-send-email-elena.reshetova@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I would really love finally to merge these old patches (now rebased on top of linux-next/master as of last friday), since as far as I remember none has raised any more concerns on them. refcount_t has been now successfully used in kernel in many places, helped to detect bugs and mistakes in logic of refcounters. This series, for scheduler and task struct specifically, 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 lead to use-after-free vulnerabilities. The patches are fully independent and can be cherry-picked separately. More information about each conversion in each patch separately. Elena Reshetova (5): sched: convert sighand_struct.count to refcount_t sched: convert signal_struct.sigcnt to refcount_t sched: convert numa_group.refcount to refcount_t sched/task_struct: convert task_struct.usage to refcount_t sched/task_struct: convert task_struct.stack_refcount to refcount_t fs/exec.c | 4 ++-- fs/proc/task_nommu.c | 2 +- include/linux/init_task.h | 1 + include/linux/sched.h | 5 +++-- include/linux/sched/signal.h | 5 +++-- include/linux/sched/task.h | 4 ++-- include/linux/sched/task_stack.h | 2 +- init/init_task.c | 6 +++--- kernel/fork.c | 24 ++++++++++++------------ kernel/sched/fair.c | 12 ++++++------ 10 files changed, 34 insertions(+), 31 deletions(-) -- 2.7.4