[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190919173705.2181-1-mathieu.desnoyers@efficios.com>
Date: Thu, 19 Sep 2019 13:36:58 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...ux.ibm.com>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Oleg Nesterov <oleg@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Russell King - ARM Linux admin <linux@...linux.org.uk>,
Chris Metcalf <cmetcalf@...hip.com>,
Christoph Lameter <cl@...ux.com>,
Kirill Tkhai <tkhai@...dex.ru>, Mike Galbraith <efault@....de>,
Thomas Gleixner <tglx@...utronix.de>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: [RFC PATCH for 5.4 0/7] Membarrier fixes and cleanups
Hi,
Those series of fixes and cleanups are initially motivated by the report
of race in membarrier, which can load p->mm->membarrier_state after mm
has been freed (use-after-free).
Thanks,
Mathieu
Mathieu Desnoyers (7):
Fix: sched/membarrier: Private expedited registration check
Cleanup: sched/membarrier: Remove redundant check
Cleanup: sched/membarrier: Only sync_core before usermode for same mm
Fix: sched/membarrier: p->mm->membarrier_state racy load (v4)
selftests: sched/membarrier: Add multi-threaded test
sched/membarrier: Skip IPIs when mm->mm_users == 1
sched/membarrier: Return -ENOMEM to userspace on memory allocation
failure
fs/exec.c | 2 +-
include/linux/mm_types.h | 14 +-
include/linux/sched/mm.h | 10 +-
kernel/sched/core.c | 4 +-
kernel/sched/membarrier.c | 236 +++++++++++-------
kernel/sched/sched.h | 34 +++
tools/testing/selftests/membarrier/.gitignore | 3 +-
tools/testing/selftests/membarrier/Makefile | 5 +-
...mbarrier_test.c => membarrier_test_impl.h} | 40 +--
.../membarrier/membarrier_test_multi_thread.c | 73 ++++++
.../membarrier_test_single_thread.c | 24 ++
11 files changed, 329 insertions(+), 116 deletions(-)
rename tools/testing/selftests/membarrier/{membarrier_test.c => membarrier_test_impl.h} (95%)
create mode 100644 tools/testing/selftests/membarrier/membarrier_test_multi_thread.c
create mode 100644 tools/testing/selftests/membarrier/membarrier_test_single_thread.c
--
2.17.1
Powered by blists - more mailing lists