[PATCH 0/5] mseal cleanups

Lorenzo Stoakes posted 5 patches 2 months, 3 weeks ago
There is a newer version of this series
include/linux/mm.h               |   6 +-
mm/madvise.c                     |  62 +++++++++++-
mm/mseal.c                       | 161 +++++--------------------------
mm/vma.c                         |  18 ++++
mm/vma.h                         |  26 +----
tools/testing/vma/vma_internal.h |   6 +-
6 files changed, 116 insertions(+), 163 deletions(-)
[PATCH 0/5] mseal cleanups
Posted by Lorenzo Stoakes 2 months, 3 weeks ago
Perform a number of cleanups to the mseal logic. Firstly, VM_SEALED is
treated differently from every other VMA flag, it really doesn't make sense
to do this and complicates logic, so we start by making this consistent
with everything else.

Next we place the madvise logic where it belongs - in mm/madvise.c. It
really makes no sense to abstract this elsewhere. In doing so, we go to
great lengths to explain very clearly the previously very confusing logic
as to what sealed mappings are impacted here.

We abstract out and explain the 'are there are any gaps in this range in
the mm?' check being performed as a prerequisite to mseal being performed,
and finally we simplify the actual mseal logic which is really quite
straightforward.

Lorenzo Stoakes (5):
  mm/mseal: always define VM_SEALED
  mm/mseal: move madvise() logic to mm/madvise.c
  mm/mseal: small cleanups
  mm/mseal: separate out and simplify VMA gap check
  mm/mseal: rework mseal apply logic

 include/linux/mm.h               |   6 +-
 mm/madvise.c                     |  62 +++++++++++-
 mm/mseal.c                       | 161 +++++--------------------------
 mm/vma.c                         |  18 ++++
 mm/vma.h                         |  26 +----
 tools/testing/vma/vma_internal.h |   6 +-
 6 files changed, 116 insertions(+), 163 deletions(-)

--
2.50.1