lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221223155616.297723-1-david@redhat.com>
Date:   Fri, 23 Dec 2022 16:56:14 +0100
From:   David Hildenbrand <david@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Xu <peterx@...hat.com>, Hugh Dickins <hughd@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Nadav Amit <nadav.amit@...il.com>
Subject: [PATCH v1 0/2] mm: uffd-wp + change_protection() cleanups

Based on linus/master and [1]:
  "mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a
   VMA"

Cleanup page protection handling in uffd-wp when calling
change_protection() and improve unprotecting uffd=wp in private mappings,
trying to set PTEs writable again if possible just like we do during
mprotect() when upgrading write permissions. Make the change_protection()
interface harder to get wrong :)

I consider both pages primarily cleanups, although patch #1 fixes a
corner case with uffd-wp and softdirty tracking for shmem. @Peter, please
let me know if we should flag patch #1 as pure cleanup -- I have no idea
how important softdirty tracking on shmem is.

Survives my simple test case + selftests/vm.

Last patch series before Christmas; happy holidays everyone!

Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Peter Xu <peterx@...hat.com>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Andrea Arcangeli <aarcange@...hat.com>
Cc: Nadav Amit <nadav.amit@...il.com>

[1] https://lore.kernel.org/all/20221209080912.7968-1-david@redhat.com/T/#u

David Hildenbrand (2):
  mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range()
  mm/mprotect: drop pgprot_t parameter from change_protection()

 include/linux/mm.h |  3 +--
 mm/mempolicy.c     |  3 +--
 mm/mprotect.c      | 14 +++++++++++---
 mm/userfaultfd.c   | 17 ++++++++++++-----
 4 files changed, 25 insertions(+), 12 deletions(-)

-- 
2.38.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ