All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elena Reshetova <elena.reshetova@intel.com>
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 <elena.reshetova@intel.com>
Subject: [PATCH 0/5] sched refcount_t conversions
Date: Fri, 18 Jan 2019 14:27:25 +0200	[thread overview]
Message-ID: <1547814450-18902-1-git-send-email-elena.reshetova@intel.com> (raw)

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


             reply	other threads:[~2019-01-18 12:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 12:27 Elena Reshetova [this message]
2019-01-18 12:27 ` [PATCH 1/5] sched: convert sighand_struct.count to refcount_t Elena Reshetova
2019-01-18 12:56   ` Andrea Parri
2019-01-18 17:24     ` Reshetova, Elena
2019-01-21 17:05   ` Oleg Nesterov
2019-02-04  8:53   ` [tip:sched/core] sched/core: Convert " tip-bot for Elena Reshetova
2019-01-18 12:27 ` [PATCH 2/5] sched: convert signal_struct.sigcnt " Elena Reshetova
2019-01-21 17:28   ` Oleg Nesterov
2019-01-22  9:11     ` Reshetova, Elena
2019-01-22  9:26       ` Peter Zijlstra
2019-01-22  9:36         ` Reshetova, Elena
2019-02-04  8:54   ` [tip:sched/core] sched/core: Convert " tip-bot for Elena Reshetova
2019-01-18 12:27 ` [PATCH 3/5] sched: convert numa_group.refcount " Elena Reshetova
2019-02-04  8:55   ` [tip:sched/core] sched/fair: Convert " tip-bot for Elena Reshetova
2019-01-18 12:27 ` [PATCH 4/5] sched/task_struct: convert task_struct.usage " Elena Reshetova
2019-02-04  8:55   ` [tip:sched/core] sched/core: Convert " tip-bot for Elena Reshetova
2019-01-18 12:27 ` [PATCH 5/5] sched/task_struct: convert task_struct.stack_refcount " Elena Reshetova
2019-02-04  8:56   ` [tip:sched/core] sched/core: Convert " tip-bot for Elena Reshetova
2019-01-18 15:06 ` [PATCH 0/5] sched refcount_t conversions Andrea Parri
2019-01-18 17:41   ` Reshetova, Elena
2019-01-18 16:03 ` Peter Zijlstra
2019-01-18 17:40   ` Reshetova, Elena
2019-02-05 11:57   ` Reshetova, Elena
2019-02-05 12:31     ` 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=1547814450-18902-1-git-send-email-elena.reshetova@intel.com \
    --to=elena.reshetova@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.