lkml.org 
[lkml]   [2019]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC PATCH for 5.4 0/7] Membarrier fixes and cleanups
Date
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

\
 
 \ /
  Last update: 2019-09-19 19:39    [W:0.153 / U:6.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site