On 31/05/2025 08:46, Mike Rapoport wrote:
> Hi Ryan,
>
> On Fri, May 30, 2025 at 04:55:36PM +0100, Ryan Roberts wrote:
>> On 30/05/2025 15:47, Lorenzo Stoakes wrote:
>>> +cc Jann who is a specialist in all things page table-y and especially scary
>>> edge cases :
On 30/05/2025 17:23, Liam R. Howlett wrote:
> * Ryan Roberts [250530 10:05]:
>> Lazy mmu mode applies to the current task and permits pte modifications
>> to be deferred and updated at a later time in a batch to improve
>> performance. apply_to_page_range() calls its call
On 30/05/2025 17:26, Jann Horn wrote:
> On Fri, May 30, 2025 at 4:04 PM Ryan Roberts wrote:
>> pagemap_scan_pmd_entry() was previously modifying ptes while in lazy mmu
>> mode, then performing tlb maintenance for the modified ptes, then
>> leaving lazy mmu mode. But any pte
On 30/05/2025 15:47, Lorenzo Stoakes wrote:
> +cc Jann who is a specialist in all things page table-y and especially scary
> edge cases :)
>
> On Fri, May 30, 2025 at 03:04:38PM +0100, Ryan Roberts wrote:
>> Hi All,
>>
>> I recently added support for lazy mmu mode
commit and reinstate the VM_WARN() if nesting is detected in future.
Signed-off-by: Ryan Roberts
---
arch/arm64/include/asm/pgtable.h | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index ad
PI to check if we
are in lazy mmu mode, and if so, when calling into the page allocator,
temporarily leave lazy mmu mode.
Given this new API we can also add VM_WARNings to check that we exit
lazy mmu mode when required to ensure the PTEs are actually updated
prior to tlb flushing.
Signed-off-by:
performing an allocation, and will additionally be used to ensure
pte modification vs tlb flushing order does not get inadvertantly
swapped.
Signed-off-by: Ryan Roberts
---
arch/arm64/include/asm/pgtable.h | 8
.../powerpc/include/asm/book3s/64/tlbflush-hash.h | 15
e updated to use the _nolazy variants.
Signed-off-by: Ryan Roberts
---
include/linux/mm.h | 6 ++
kernel/bpf/arena.c | 6 +++---
mm/kasan/shadow.c | 2 +-
mm/memory.c| 54 +++---
4 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/
ot;)
Signed-off-by: Ryan Roberts
---
mm/migrate_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/migrate_device.c b/mm/migrate_device.c
index 3158afe7eb23..fc73a940c112 100644
--- a/mm/migrate_device.c
+++ b/mm/migrate_device.c
@@ -283,11 +283,1
lly
clear info about PTEs")
Signed-off-by: Ryan Roberts
---
fs/proc/task_mmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 994cde10e3f4..361f3ffd9a0c 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2557,10 +2
es (with DEBUG_PAGEALLOC and KFENCE enabled).
Applies against Linus's master branch (f66bc387efbe).
Thanks,
Ryan
Ryan Roberts (6):
fs/proc/task_mmu: Fix pte update and tlb maintenance ordering in
pagemap_scan_pmd_entry()
mm: Fix pte update and tlb maintenance orderi
On 28/05/2025 13:40, David Hildenbrand wrote:
> On 28.05.25 12:53, Ryan Roberts wrote:
>> On 28/05/2025 11:48, David Hildenbrand wrote:
>>> On 28.05.25 12:44, David Hildenbrand wrote:
>>>> On 28.05.25 12:34, Ryan Roberts wrote:
>>>>> Hi David,
On 28/05/2025 11:48, David Hildenbrand wrote:
> On 28.05.25 12:44, David Hildenbrand wrote:
>> On 28.05.25 12:34, Ryan Roberts wrote:
>>> Hi David,
>>>
>>>
>>> On 09/05/2025 16:30, David Hildenbrand wrote:
>>>> Let's test some basic
Hi David,
On 09/05/2025 16:30, David Hildenbrand wrote:
> Let's test some basic functionality using /dev/mem. These tests will
> implicitly cover some PAT (Page Attribute Handling) handling on x86.
>
> These tests will only run when /dev/mem access to the first two pages
> in physical address sp
On 22/04/2025 12:07, Lorenzo Stoakes wrote:
> On Tue, Apr 22, 2025 at 12:03:08PM +0100, Ryan Roberts wrote:
>> On 22/04/2025 11:47, Lorenzo Stoakes wrote:
>>> On Tue, Apr 22, 2025 at 11:37:57AM +0100, Ryan Roberts wrote:
>
> [snip]
>
>>>>
>>>>
On 22/04/2025 11:47, Lorenzo Stoakes wrote:
> On Tue, Apr 22, 2025 at 11:37:57AM +0100, Ryan Roberts wrote:
>> On 13/02/2025 18:17, Lorenzo Stoakes wrote:
>>> Extend the guard region tests to allow for test fixture variants for anon,
>>> shmem, and local file files
On 13/02/2025 18:17, Lorenzo Stoakes wrote:
> Extend the guard region tests to allow for test fixture variants for anon,
> shmem, and local file files.
>
> This allows us to assert that each of the expected behaviours of anonymous
> memory also applies correctly to file-backed (both shmem and an a
On 23/01/2025 17:40, Peter Xu wrote:
> On Thu, Jan 23, 2025 at 02:38:46PM +0000, Ryan Roberts wrote:
>>> @@ -5470,7 +5471,18 @@ static void move_huge_pte(struct vm_area_struct
>>> *vma, unsigned long old_addr,
>>> spin_lock_nested(src_ptl, SINGLE_DEP
On 23/01/2025 14:38, Ryan Roberts wrote:
> I think there might be a bug in this after all...
>
>
> On 07/01/2025 14:47, Ryan Roberts wrote:
>> When mremap()ing a memory region previously registered with userfaultfd
>> as write-protected but without UFFD_FEATURE_EVENT_RE
I think there might be a bug in this after all...
On 07/01/2025 14:47, Ryan Roberts wrote:
> When mremap()ing a memory region previously registered with userfaultfd
> as write-protected but without UFFD_FEATURE_EVENT_REMAP, an
> inconsistency in flag clearing leads to a mismatch betwee
On 15/01/2025 20:28, Peter Xu wrote:
> On Tue, Jan 07, 2025 at 02:47:52PM +0000, Ryan Roberts wrote:
>> When mremap()ing a memory region previously registered with userfaultfd
>> as write-protected but without UFFD_FEATURE_EVENT_REMAP, an
>> inconsistency in flag clearin
On 15/01/2025 17:30, Lorenzo Stoakes wrote:
> On Wed, Jan 15, 2025 at 12:21:15PM -0500, Peter Xu wrote:
>> On Wed, Jan 15, 2025 at 04:58:06PM +0000, Ryan Roberts wrote:
>>> Hi Peter, David,
>>
>> Hey, Ryan,
>>
>>>
>>> On 07/01/2025 14:47, Rya
Hi Peter, David,
On 07/01/2025 14:47, Ryan Roberts wrote:
> When mremap()ing a memory region previously registered with userfaultfd
> as write-protected but without UFFD_FEATURE_EVENT_REMAP, an
> inconsistency in flag clearing leads to a mismatch between the vma flags
> (which
: Ryan Roberts
---
tools/testing/selftests/mm/.gitignore | 1 +
tools/testing/selftests/mm/Makefile | 2 +
tools/testing/selftests/mm/run_vmtests.sh | 1 +
tools/testing/selftests/mm/uffd-wp-mremap.c | 380
4 files changed, 384 insertions(+)
create mode
existing
clearing of VM_UFFD_WP. Be careful to clear the logical flag regardless
of its physical form; a PTE bit, a swap PTE bit, or a PTE marker. Cover
PTE, huge PMD and hugetlb paths.
Co-developed-by: Mikołaj Lenczewski
Signed-off-by: Mikołaj Lenczewski
Signed-off-by: Ryan Roberts
Closes:
https
d the patch, which I have
subsequently extended.
Applies on top of mm-unstable (f349e79bfbf3)
Thanks,
Ryan
Ryan Roberts (2):
mm: Clear uffd-wp PTE/PMD state on mremap()
selftests/mm: Introduce uffd-wp-mremap regression test
include/linux/userfaultfd_k.h | 12 +
mm/huge_mem
On 03/10/2024 22:17, Edward Liaw wrote:
> Swaps synchronization primitive with pthread_barrier, so that
> stdatomic.h does not need to be included.
>
> The synchronization is needed on Android ARM64; we see a deadlock with
> pthread_create when the parent thread races forward before the child has
27 matches
Mail list logo