Re: [PATCH v3] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-05 Thread David Hildenbrand
nmap'ed file as input: pfnmap -r pfnmap.madvise_disallowed -- randfile.txt TAP version 13 1..1 # Starting 1 tests from 1 test cases. # RUN pfnmap.madvise_disallowed ... # SKIP Invalid file: 'randfile.txt'. Not pfnmap'ed Signe

Re: [PATCH v3 3/7] selftest/mm: Fix ksm_funtional_test failures

2025-08-04 Thread David Hildenbrand
test_prctl_fork(void) child_pid = fork(); if (!child_pid) { + init_global_file_handles(); Would this leave fd in parent as orphan? Probably yes, but only until the child quits, so likely we don't care. -- Cheers, David / dhildenb

Re: [PATCH v3 4/7] mm/selftests: Fix split_huge_page_test failure on systems with 64KB page size

2025-08-04 Thread David Hildenbrand
can factor it into vm_util.h and use it here. That sounds reasonable to me. -- Cheers, David / dhildenb

Re: [PATCH v2] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-04 Thread David Hildenbrand
ething unrelated, like the vdso or something odd like that) We have a helper in vm_util.c that might be useful: __get_smap_entry() We also have a check_vmflag_io() in there. So likely you want to add a helper check_vmflag_pfnmap(). Nothing else jumped at me, except that phys_addr might be better called something like "offset" now. -- Cheers, David / dhildenb

Re: [GIT PULL v2] virtio, vhost: features, fixes

2025-08-01 Thread Dr. David Alan Gilbert
Linus > -- -Open up your eyes, open up your mind, open up your code --- / Dr. David Alan Gilbert| Running GNU/Linux | Happy \ \dave @ treblig.org | | In Hex / \ _|_ http://www.treblig.org |___/

Re: [PATCH] selftests/mm: pass filename as input param to VM_PFNMAP tests

2025-08-01 Thread David Hildenbrand
dev/mem. That doesn't make any sense with what you are doing here. If we are not provided /dev/mem, you should probably try mapping offset 0 of the file. -- Cheers, David / dhildenb

[PATCH RESEND v5 6/7] Input: synaptics-rmi4 - read product ID on aftermarket touch ICs

2025-07-31 Thread David Heidelberg via B4 Relay
Connolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_f01.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index 47be64284b25ede8103ada86d6b58fd3a26976bb..2278e9b6a920774b07ec9dd3e452cedc69469be8 100644

[PATCH RESEND v5 5/7] Input: synaptics-rmi4 - don't do unaligned reads in IRQ context

2025-07-31 Thread David Heidelberg via B4 Relay
unaligned address. Signed-off-by: Kaustabh Chakraborty Signed-off-by: Caleb Connolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4

[PATCH RESEND v5 4/7] Input: synaptics-rmi4 - f55: handle zero electrode count

2025-07-31 Thread David Heidelberg via B4 Relay
nolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_f55.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/input/rmi4/rmi_f55.c b/drivers/input/rmi4/rmi_f55.c index 488adaca4dd00482cd1106d813b32871092c83a0..776c915b82e72b8a6eb5ec701cce9059c87089c4 100644 --- a/drivers/

[PATCH RESEND v5 7/7] Input: synaptics-rmi4 - support fallback values for PDT descriptor bytes

2025-07-31 Thread David Heidelberg via B4 Relay
IC) rmi4_i2c 12-0020: read 6 bytes at 0x00e3: 0 (2c 23 0d 06 00 00) Signed-off-by: Kaustabh Chakraborty [codeflow adjustments, checkpatch fixes, wording] Signed-off-by: Caleb Connolly Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c | 62

[PATCH RESEND v5 3/7] Input: synaptics-rmi4 - f12: use hardcoded values for aftermarket touch ICs

2025-07-31 Thread David Heidelberg via B4 Relay
t, so these fallback values are offered as an alternative to the error path when register descriptors aren't available. Signed-off-by: Kaustabh Chakraborty [changes for readability / codeflow, checkpatch fixes] Signed-off-by: Caleb Connolly Signed-off-by: David Heidelberg --- drivers/

[PATCH RESEND v5 0/7] Input: synaptics-rmi4 - add quirks for third party touchscreen controllers

2025-07-31 Thread David Heidelberg via B4 Relay
v1: https://lore.kernel.org/r/20230929-caleb-rmi4-quirks-v1-0-cc3c703f0...@linaro.org --- Caleb Connolly (1): Input: synaptics-rmi4 - handle duplicate/unknown PDT entries David Heidelberg (1): dt-bindings: input: syna,rmi4: Document syna,rmi4-s3706b Kaustabh Chakraborty (5): In

[PATCH RESEND v5 1/7] dt-bindings: input: syna,rmi4: Document syna,rmi4-s3706b

2025-07-31 Thread David Heidelberg via B4 Relay
From: David Heidelberg Mostly irrelevant for authentic Synaptics touchscreens, but very important for applying workarounds to cheap TS knockoffs. These knockoffs work well with the downstream driver, and since the user has no way to distinguish them, later in this patch set, we introduce

[PATCH RESEND v5 2/7] Input: synaptics-rmi4 - handle duplicate/unknown PDT entries

2025-07-31 Thread David Heidelberg via B4 Relay
us 6T (original parts): manufacturer: Synaptics, product: S3706B, fw id: 2852315 Co-developed-by: Kaustabh Chakraborty Signed-off-by: Kaustabh Chakraborty Signed-off-by: Caleb Connolly Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c

[RFC PATCH 2/2] kunit: tool: Automatically pick a default architecture if none is specified

2025-07-30 Thread David Gow
g/kunit/kunit.py run` should function out-of-the-box on most non-x86 architectures, assuming qemu is installed. Signed-off-by: David Gow --- tools/testing/kunit/kunit.py | 2 +- tools/testing/kunit/kunit_kernel.py| 43 -- tools/testing/kunit/kunit_tool_te

[RFC PATCH 1/2] kunit: tool: Move qemu architecture dependency checks into a function

2025-07-30 Thread David Gow
esent. Instead, have kunit.py look for a check_dependencies function, and call it if present only when the architecture config is being used. This is necessary for future changes which enumerate or automatically select an architecture. Signed-off-by: David Gow --- tools/testing/kunit/kunit_kern

Re: [PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-30 Thread David Hildenbrand
On 18.07.25 14:43, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:03:44PM +0200, David Hildenbrand wrote: On 17.07.25 21:55, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 08:51:51PM +0100, Lorenzo Stoakes wrote: @@ -721,37 +772,21 @@ struct page *vm_normal_page_pmd(struct vm_area_struct

[PATCH] kunit: tool: Accept --raw_output=full as an alias of 'all'

2025-07-29 Thread David Gow
I can never remember whether --raw_output takes 'all' or 'full'. No reason we can't support both. For the record, 'all' is the recommended, documented option. Signed-off-by: David Gow --- tools/testing/kunit/kunit.py | 4 ++-- 1 file changed, 2 insertions(+),

Re: [PATCH] rust: kernel: remove support for unused host `#[test]`s

2025-07-28 Thread David Gow
BVgOS=AKHSfifp0S68K3jgNZAkALBr=7iFb=niryg5wdxj...@mail.gmail.com/ > [1] > Signed-off-by: Miguel Ojeda > --- With my (biased) KUnit hat on, this looks good to me. _Maybe_ it's worth updating Documentation/rust/testing.rst, though it already says these are "mostly used for testin

Re: [PATCH][next] tools/testing/selftests: Fix spelling mistake "unnmap" -> "unmap"

2025-07-23 Thread David Hildenbrand
On 23.07.25 11:50, Colin Ian King wrote: There is a spelling mistake in ksft_test_result_fail messages. Fix them. Signed-off-by: Colin Ian King --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH V9 0/7] Add NUMA mempolicy support for KVM guest-memfd

2025-07-23 Thread David Hildenbrand
On 23.07.25 01:07, Sean Christopherson wrote: On Tue, Jul 22, 2025, David Hildenbrand wrote: On 22.07.25 16:45, Sean Christopherson wrote: On Tue, Jul 22, 2025, David Hildenbrand wrote: Just to clarify: this is based on Fuad's stage 1 and should probably still be tagged "RFC" u

Re: [PATCH V9 0/7] Add NUMA mempolicy support for KVM guest-memfd

2025-07-22 Thread David Hildenbrand
On 22.07.25 16:45, Sean Christopherson wrote: On Tue, Jul 22, 2025, David Hildenbrand wrote: Just to clarify: this is based on Fuad's stage 1 and should probably still be tagged "RFC" until stage-1 is finally upstream. (I was hoping stage-1 would go upstream in 6.17, but I am

Re: [PATCH V9 6/7] KVM: guest_memfd: Enforce NUMA mempolicy using shared policy

2025-07-22 Thread David Hildenbrand
, which are not supported for guest_memfd as it is unmovable. Suggested-by: David Hildenbrand Signed-off-by: Shivank Garg --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH V9 3/7] mm/filemap: Extend __filemap_get_folio() to support NUMA memory policies

2025-07-22 Thread David Hildenbrand
eviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH V9 2/7] mm/filemap: Add NUMA mempolicy support to filemap_alloc_folio()

2025-07-22 Thread David Hildenbrand
cated NUMA policy specified by VMM. All existing users pass NULL maintaining current behavior. Reviewed-by: Pankaj Gupta Reviewed-by: Vlastimil Babka Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Shivank Garg --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH V9 1/7] KVM: guest_memfd: Use guest mem inodes instead of anonymous inodes

2025-07-22 Thread David Hildenbrand
+&kvm_gmem_fops); + if (IS_ERR(file)) { + err = PTR_ERR(file); + goto err_put_inode; + } + + file->f_flags |= O_LARGEFILE; + file->private_data = priv; + Nothing else jumped at me. -- Cheers, David / dhildenb

Re: [PATCH V9 0/7] Add NUMA mempolicy support for KVM guest-memfd

2025-07-22 Thread David Hildenbrand
2025 + fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass was merged with the kvm export EXPORT_SYMBOL_GPL_FOR_MODULES(anon_inode_make_secure_inode, "kvm"); I thought I commented that this is something to done separately and not really "fix&quo

Re: [PATCH 06/14] vdso/gettimeofday: Return bool from clock_gettime() helpers

2025-07-19 Thread David Laight
if (unlikely(!ok)) Do you even need 'ok' at all, just: if (unlikely(!__cvdso_clock_gettime_common(vd, clock, &ts))) > return clock_gettime32_fallback(clock, res); > > - /* For ret == 0 */ > + /* For ok == true */ > res->tv_sec = ts.tv_sec; > res->tv_nsec = ts.tv_nsec; > > - return ret; > + return 0; > } > > static __maybe_unused int David

Re: [PATCH 4/7] arch/nios: replace "__auto_type" with "auto"

2025-07-19 Thread David Laight
ts of 'buffer' to/from 'void *' are fine (and not needed), casts to/from 'integer_type *' are definitely problematic. And 'random' casts of integer values could easily hide real bugs and most just aren't needed. Although you might want the compiler to make the result of 'u64_var & 0xffu' 'unsigned int'. David

Re: [PATCH 4/7] arch/nios: replace "__auto_type" with "auto"

2025-07-19 Thread David Laight
t; typeof(*__pu_ptr) __pu_val = (typeof(*__pu_ptr))(x);\ You need to align the \ Plausibly possible by post-processing the diffs. David

Re: [PATCH v2 8/9] mm: introduce and use vm_normal_page_pud()

2025-07-18 Thread David Hildenbrand
On 18.07.25 12:47, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:14:33PM +0200, David Hildenbrand wrote: On 17.07.25 22:03, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand wrote: Let's introduce vm_normal_page_pud(), which ends up being fairly s

Re: [PATCH v2 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-18 Thread David Hildenbrand
In a MIXEDMAP that will get refcounted. Not sure if there are users that use VM_IO in a MIXEDMAP, I would assume so but didn't check. So VM_IO doesn't really interact with vm_normal_page(), really. It's all about PFNMAP and MIXEDMAP. -- Cheers, David / dhildenb

Re: [PATCH v2 5/9] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-18 Thread David Hildenbrand
On 18.07.25 12:41, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 10:31:28PM +0200, David Hildenbrand wrote: On 17.07.25 20:29, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:08PM +0200, David Hildenbrand wrote: The huge zero folio is refcounted (+mapcounted -- is that a word

Re: [PATCH v2 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-18 Thread David Hildenbrand
On 18.07.25 09:59, Demi Marie Obenour wrote: On 7/18/25 03:44, David Hildenbrand wrote: On 18.07.25 00:06, Demi Marie Obenour wrote: On 7/17/25 07:52, David Hildenbrand wrote: print_bad_pte() looks like something that should actually be a WARN or similar, but historically it apparently has

Re: [PATCH v2 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-18 Thread David Hildenbrand
On 18.07.25 00:06, Demi Marie Obenour wrote: On 7/17/25 07:52, David Hildenbrand wrote: print_bad_pte() looks like something that should actually be a WARN or similar, but historically it apparently has proven to be useful to detect corruption of page tables even on production systems -- report

Re: [PATCH] mm: Replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion

2025-07-18 Thread David Hildenbrand
On 18.07.25 04:41, Ye Liu wrote: From: Ye Liu Replace repeated (20 - PAGE_SHIFT) calculations with standard macros: - MB_TO_PAGES(mb)converts MB to page count - PAGES_TO_MB(pages) converts pages to MB No functional change. Signed-off-by: Ye Liu --- Acked-by: David Hildenbrand

Re: [PATCH v2 5/9] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-17 Thread David Hildenbrand
On 17.07.25 20:29, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:08PM +0200, David Hildenbrand wrote: The huge zero folio is refcounted (+mapcounted -- is that a word?) differently than "normal" folios, similarly (but different) to the ordinary shared zeropage. Yeah, I sort

Re: [PATCH v2 8/9] mm: introduce and use vm_normal_page_pud()

2025-07-17 Thread David Hildenbrand
On 17.07.25 22:03, Lorenzo Stoakes wrote: On Thu, Jul 17, 2025 at 01:52:11PM +0200, David Hildenbrand wrote: Let's introduce vm_normal_page_pud(), which ends up being fairly simple because of our new common helpers and there not being a PUD-sized zero folio. Use vm_normal_page_pud

Re: [PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-17 Thread David Hildenbrand
pte: The PTE. + * + * Get the "struct folio" associated with a PTE. See vm_normal_page_pfn() + * for details. + * + * Return: Returns the "struct folio" if this is a "normal" mapping. Returns + *NULL if this is a "special" mapping. + */ Nice to add a comment, but again feels weird to have the whole explanation in vm_normal_page_pfn() but then to invoke vm_normal_page().. You want people to do pointer chasing to find what they are looking for? :) -- Cheers, David / dhildenb

Re: [PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-17 Thread David Hildenbrand
ould have to provide a "level" argument, and did not convince myself yet that that is a good idea at this point. -- Cheers, David / dhildenb

Re: [PATCH v2 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-17 Thread David Hildenbrand
that apparently it can be useful in the real world. Signed-off-by: David Hildenbrand --- mm/memory.c | 120 1 file changed, 94 insertions(+), 26 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 173eb6267e0ac..08d16ed7b4cc7 1

[PATCH v2 9/9] mm: rename vm_ops->find_special_page() to vm_ops->find_normal_page()

2025-07-17 Thread David Hildenbrand
mentation, and add a comment in the code where XEN ends up performing the pte_mkspecial() through a hypercall. More details can be found in commit 923b2919e2c3 ("xen/gntdev: mark userspace PTEs as special on x86 PV guests"). Cc: David Vrabel Reviewed-by: Oscar Salvador Signed-off-by

[PATCH v2 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-17 Thread David Hildenbrand
(). Add kerneldoc for all involved functions. No functional change intended. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- mm/memory.c | 183 +++- 1 file changed, 109 insertions(+), 74 deletions(-) diff --git a/mm/memory.

[PATCH v2 8/9] mm: introduce and use vm_normal_page_pud()

2025-07-17 Thread David Hildenbrand
ucing vm_normal_folio_pud() until really used. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- include/linux/mm.h | 2 ++ mm/memory.c| 27 +++ mm/pagewalk.c | 20 ++-- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/in

[PATCH v2 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-17 Thread David Hildenbrand
01233f5867 [ 77.944077] addr:7fd84bb1c000 vm_flags:08100071 anon_vma: ... [ 77.945186] pgd:10a89f067 p4d:10a89f067 pud:10e5a2067 pmd:105327067 Not using pgdp_get(), because that does not work properly on some arm configs where pgd_t is an array. Note that we are dumping all levels even

[PATCH v2 5/9] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-17 Thread David Hildenbrand
vm_normal_page(). While at it, update the doc regarding the shared zero folios. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 5 - mm/memory.c | 14 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/m

[PATCH v2 4/9] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-17 Thread David Hildenbrand
ng to insert a PMD mapping a folio through dax_fault_iter()->vmf_insert_folio_pmd(). So, it sounds reasonable to not handle huge zero folios differently to inserting PMDs mapping folios when there already is something mapped. Reviewed-by: Alistair Popple Signed-off-by: David Hildenbran

[PATCH v2 3/9] mm/huge_memory: support huge zero folio in vmf_insert_folio_pmd()

2025-07-17 Thread David Hildenbrand
shared zeropage. For now, the huge zero folio is not marked as special yet, although vm_normal_page_pmd() really wants to treat it as special. We'll change that next. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 8 +--- 1 file changed, 5 inser

[PATCH v2 2/9] mm/huge_memory: move more common code into insert_pud()

2025-07-17 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git

[PATCH v2 1/9] mm/huge_memory: move more common code into insert_pmd()

2025-07-17 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 72 1 file changed, 24 insertions(+), 48 deletions(-) diff --

[PATCH v2 0/9] mm: vm_normal_page*() improvements

2025-07-17 Thread David Hildenbrand
l Hocko Cc: Zi Yan Cc: Baolin Wang Cc: Nico Pache Cc: Ryan Roberts Cc: Dev Jain Cc: Barry Song Cc: Jann Horn Cc: Pedro Falcato Cc: Hugh Dickins Cc: Oscar Salvador Cc: Lance Yang David Hildenbrand (9): mm/huge_memory: move more common code into insert_pmd() mm/huge_memory: mov

Re: [PATCH v1 4/9] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-17 Thread David Hildenbrand
On 17.07.25 10:38, Alistair Popple wrote: On Tue, Jul 15, 2025 at 03:23:45PM +0200, David Hildenbrand wrote: Let's convert to vmf_insert_folio_pmd(). There is a theoretical change in behavior: in the unlikely case there is already something mapped, we'll now still call trace_dax_pmd

Re: [PATCH v1 0/9] mm: vm_normal_page*() improvements

2025-07-17 Thread David Hildenbrand
On 17.07.25 00:27, Andrew Morton wrote: On Wed, 16 Jul 2025 10:47:29 +0200 David Hildenbrand wrote: However the series rejects due to the is_huge_zero_pmd -> is_huge_zero_pfn changes in Luiz's "mm: introduce snapshot_page() v3" series, so could we please have a redo agai

Re: [PATCH v7 1/7] selftests/proc: add /proc/pid/maps tearing from vma split test

2025-07-16 Thread David Hildenbrand
Example Command: proc-maps-race -d 10 Signed-off-by: Suren Baghdasaryan Why is this selftest not making use of any kselftest framework? I'm sure there is a very good reason :) Reading assert() feels very weird compared to other selftests. -- Cheers, David / dhildenb

Re: [PATCH v7 6/7] fs/proc/task_mmu: remove conversion of seq_file position to unsigned

2025-07-16 Thread David Hildenbrand
ed-by: Vlastimil Babka --- Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v7 4/7] selftests/proc: test PROCMAP_QUERY ioctl while vma is concurrently modified

2025-07-16 Thread David Hildenbrand
dy in. -- Cheers, David / dhildenb

Re: [PATCH v1 0/9] mm: vm_normal_page*() improvements

2025-07-16 Thread David Hildenbrand
On 16.07.25 01:31, Andrew Morton wrote: On Tue, 15 Jul 2025 15:23:41 +0200 David Hildenbrand wrote: Based on mm/mm-new. I dropped the CoW PFNMAP changes for now, still working on a better way to sort all that out cleanly. Cleanup and unify vm_normal_page_*() handling, also marking the huge

Re: [PATCH v1 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-16 Thread David Hildenbrand
On 15.07.25 15:23, David Hildenbrand wrote: print_bad_pte() looks like something that should actually be a WARN or similar, but historically it apparently has proven to be useful to detect corruption of page tables even on production systems -- report the issue and keep the system running to

[PATCH v1 6/9] mm/memory: convert print_bad_pte() to print_bad_page_map()

2025-07-15 Thread David Hildenbrand
01233f5867 [ 77.944077] addr:7fd84bb1c000 vm_flags:08100071 anon_vma: ... [ 77.945186] pgd:10a89f067 p4d:10a89f067 pud:10e5a2067 pmd:105327067 Signed-off-by: David Hildenbrand --- mm/memory.c | 120 1 file changed, 94 insertions(+), 2

[PATCH v1 1/9] mm/huge_memory: move more common code into insert_pmd()

2025-07-15 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 72 1 file changed, 24 insertions(+), 48 deletions(-) diff --

[PATCH v1 7/9] mm/memory: factor out common code from vm_normal_page_*()

2025-07-15 Thread David Hildenbrand
(). Add kerneldoc for all involved functions. No functional change intended. Signed-off-by: David Hildenbrand --- mm/memory.c | 183 +++- 1 file changed, 109 insertions(+), 74 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 00ee0df020503..d5f

[PATCH v1 8/9] mm: introduce and use vm_normal_page_pud()

2025-07-15 Thread David Hildenbrand
ucing vm_normal_folio_pud() until really used. Signed-off-by: David Hildenbrand --- include/linux/mm.h | 2 ++ mm/memory.c| 27 +++ mm/pagewalk.c | 20 ++-- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/include/linux/mm.h b/include/

[PATCH v1 5/9] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-15 Thread David Hildenbrand
vm_normal_page(). While at it, update the doc regarding the shared zero folios. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 5 - mm/memory.c | 14 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/m

[PATCH v1 4/9] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-15 Thread David Hildenbrand
ng to insert a PMD mapping a folio through dax_fault_iter()->vmf_insert_folio_pmd(). So, it sounds reasonable to not handle huge zero folios differently to inserting PMDs mapping folios when there already is something mapped. Signed-off-by: David Hildenbran

[PATCH v1 9/9] mm: rename vm_ops->find_special_page() to vm_ops->find_normal_page()

2025-07-15 Thread David Hildenbrand
mentation, and add a comment in the code where XEN ends up performing the pte_mkspecial() through a hypercall. More details can be found in commit 923b2919e2c3 ("xen/gntdev: mark userspace PTEs as special on x86 PV guests"). Cc: David Vrabel Signed-off-by: David Hildenbrand --- drivers

[PATCH v1 3/9] mm/huge_memory: support huge zero folio in vmf_insert_folio_pmd()

2025-07-15 Thread David Hildenbrand
shared zeropage. For now, the huge zero folio is not marked as special yet, although vm_normal_page_pmd() really wants to treat it as special. We'll change that next. Reviewed-by: Oscar Salvador Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 8 +--- 1 file changed, 5 inser

[PATCH v1 2/9] mm/huge_memory: move more common code into insert_pud()

2025-07-15 Thread David Hildenbrand
Let's clean it all further up. No functional change intended. Reviewed-by: Oscar Salvador Reviewed-by: Alistair Popple Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 36 +--- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git

[PATCH v1 0/9] mm: vm_normal_page*() improvements

2025-07-15 Thread David Hildenbrand
a Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Michal Hocko Cc: Zi Yan Cc: Baolin Wang Cc: Nico Pache Cc: Ryan Roberts Cc: Dev Jain Cc: Barry Song Cc: Jann Horn Cc: Pedro Falcato Cc: Hugh Dickins Cc: Oscar Salvador Cc: Lance Yang David Hildenbrand (9): mm/huge_memory: move mor

[PATCH RESEND v5 5/7] Input: synaptics-rmi4 - don't do unaligned reads in IRQ context

2025-07-15 Thread David Heidelberg via B4 Relay
unaligned address. Signed-off-by: Kaustabh Chakraborty Signed-off-by: Caleb Connolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4

[PATCH RESEND v5 3/7] Input: synaptics-rmi4 - f12: use hardcoded values for aftermarket touch ICs

2025-07-15 Thread David Heidelberg via B4 Relay
t, so these fallback values are offered as an alternative to the error path when register descriptors aren't available. Signed-off-by: Kaustabh Chakraborty [changes for readability / codeflow, checkpatch fixes] Signed-off-by: Caleb Connolly Signed-off-by: David Heidelberg --- drivers/

[PATCH RESEND v5 4/7] Input: synaptics-rmi4 - f55: handle zero electrode count

2025-07-15 Thread David Heidelberg via B4 Relay
nolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_f55.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/input/rmi4/rmi_f55.c b/drivers/input/rmi4/rmi_f55.c index 488adaca4dd00482cd1106d813b32871092c83a0..776c915b82e72b8a6eb5ec701cce9059c87089c4 100644 --- a/drivers/

[PATCH RESEND v5 7/7] Input: synaptics-rmi4 - support fallback values for PDT descriptor bytes

2025-07-15 Thread David Heidelberg via B4 Relay
IC) rmi4_i2c 12-0020: read 6 bytes at 0x00e3: 0 (2c 23 0d 06 00 00) Signed-off-by: Kaustabh Chakraborty [codeflow adjustments, checkpatch fixes, wording] Signed-off-by: Caleb Connolly Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c | 62

[PATCH RESEND v5 6/7] Input: synaptics-rmi4 - read product ID on aftermarket touch ICs

2025-07-15 Thread David Heidelberg via B4 Relay
Connolly Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_f01.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index 47be64284b25ede8103ada86d6b58fd3a26976bb..2278e9b6a920774b07ec9dd3e452cedc69469be8 100644

[PATCH RESEND v5 2/7] Input: synaptics-rmi4 - handle duplicate/unknown PDT entries

2025-07-15 Thread David Heidelberg via B4 Relay
us 6T (original parts): manufacturer: Synaptics, product: S3706B, fw id: 2852315 Co-developed-by: Kaustabh Chakraborty Signed-off-by: Kaustabh Chakraborty Signed-off-by: Caleb Connolly Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg --- drivers/input/rmi4/rmi_driver.c

[PATCH RESEND v5 1/7] dt-bindings: input: syna,rmi4: Document syna,rmi4-s3706b

2025-07-15 Thread David Heidelberg via B4 Relay
From: David Heidelberg Mostly irrelevant for authentic Synaptics touchscreens, but very important for applying workarounds to cheap TS knockoffs. These knockoffs work well with the downstream driver, and since the user has no way to distinguish them, later in this patch set, we introduce

[PATCH RESEND v5 0/7] Input: synaptics-rmi4 - add quirks for third party touchscreen controllers

2025-07-15 Thread David Heidelberg via B4 Relay
v1: https://lore.kernel.org/r/20230929-caleb-rmi4-quirks-v1-0-cc3c703f0...@linaro.org --- Caleb Connolly (1): Input: synaptics-rmi4 - handle duplicate/unknown PDT entries David Heidelberg (1): dt-bindings: input: syna,rmi4: Document syna,rmi4-s3706b Kaustabh Chakraborty (5): In

Re: [PATCH v6 7/8] fs/proc/task_mmu: read proc/pid/maps under per-vma lock

2025-07-15 Thread David Hildenbrand
ring "why are we even caring about PROCMAP_QUERY that in the context of this patch series". Maybe that helps :) -- Cheers, David / dhildenb

Re: [PATCH RFC 14/14] mm: rename vm_ops->find_special_page() to vm_ops->find_normal_page()

2025-07-14 Thread David Hildenbrand
On 25.06.25 11:34, Oscar Salvador wrote: On Tue, Jun 17, 2025 at 05:43:45PM +0200, David Hildenbrand wrote: ... and hide it behind a kconfig option. There is really no need for any !xen code to perform this check. The naming is a bit off: we want to find the "normal" page when a PTE

Re: [PATCH] selftests/mm: refactor common code and improve test skipping in guard_region

2025-07-14 Thread David Hildenbrand
to be fixed as well, but your fix is good. The FORCE_READ() could be factored out separately, and as part of the same patch, replace the "asm volatile("" : "+r" (XXX));" usage in * cow.c * hugetlb-madvise.c * migration.c * pagemap_ioctl.c * split_huge_page_test.c -- Cheers, David / dhildenb

Re: [PATCH RFC 08/14] mm/huge_memory: mark PMD mappings of the huge zero folio special

2025-07-14 Thread David Hildenbrand
On 25.06.25 10:32, Oscar Salvador wrote: On Tue, Jun 17, 2025 at 05:43:39PM +0200, David Hildenbrand wrote: The huge zero folio is refcounted (+mapcounted -- is that a word?) differently than "normal" folios, similarly (but different) to the ordinary shared zeropage. For this

Re: [PATCH RFC 01/14] mm/memory: drop highest_memmap_pfn sanity check in vm_normal_page()

2025-07-11 Thread David Hildenbrand
On 11.07.25 20:49, Hugh Dickins wrote: On Fri, 11 Jul 2025, David Hildenbrand wrote: On 08.07.25 04:52, Hugh Dickins wrote: Of course it's limited in what it can catch (and won't even get called if the present bit was not set - a more complete patch might unify with those various

Re: [PATCH RFC 01/14] mm/memory: drop highest_memmap_pfn sanity check in vm_normal_page()

2025-07-11 Thread David Hildenbrand
On 08.07.25 04:52, Hugh Dickins wrote: On Mon, 7 Jul 2025, David Hildenbrand wrote: On 07.07.25 08:31, Hugh Dickins wrote: On Fri, 4 Jul 2025, David Hildenbrand wrote: On 03.07.25 16:44, Lance Yang wrote: On 2025/7/3 20:39, David Hildenbrand wrote: On 03.07.25 14:34, Lance Yang wrote: On

Re: [PATCH] selftests/mm: fix split_huge_page_test for folio_split() tests.

2025-07-11 Thread David Hildenbrand
l passed. Would there be a way to have made them fail? (IOW, detect that the wrong kind-of split was performed) Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v5 0/7] Input: synaptics-rmi4 - add quirks for third party touchscreen controllers

2025-07-09 Thread David Heidelberg
Hello Dmitry, I hope you're doing well. Just a gentle reminder about the patch series I sent earlier. Please let me know if there's anything I can do to help move it forward. Thank you for your time and consideration. Best regards, David On 11/06/2025 10:10, David Heidelberg wro

Re: [PATCH v3] selftests/mm: Fix UFFDIO_API usage with proper two-step feature negotiation

2025-07-08 Thread David Hildenbrand
ensures the test behaves correctly across a wider range of kernel versions and configurations, while preserving the intended behavior on kernels that support UFFD-WP. Suggestted-by: David Hildenbrand Skimming over this once again ... sorry. Nit: "Suggested-by:" Likely Andrew can

Re: [PATCH RFC 01/14] mm/memory: drop highest_memmap_pfn sanity check in vm_normal_page()

2025-07-07 Thread David Hildenbrand
On 07.07.25 08:31, Hugh Dickins wrote: On Fri, 4 Jul 2025, David Hildenbrand wrote: On 03.07.25 16:44, Lance Yang wrote: On 2025/7/3 20:39, David Hildenbrand wrote: On 03.07.25 14:34, Lance Yang wrote: On Mon, Jun 23, 2025 at 10:04 PM David Hildenbrand wrote: On 20.06.25 14:50, Oscar

Re: [PATCH RFC 07/14] fs/dax: use vmf_insert_folio_pmd() to insert the huge zero folio

2025-07-04 Thread David Hildenbrand
On 25.06.25 11:03, David Hildenbrand wrote: On 24.06.25 03:16, Alistair Popple wrote: On Tue, Jun 17, 2025 at 05:43:38PM +0200, David Hildenbrand wrote: Let's convert to vmf_insert_folio_pmd(). In the unlikely case there is already something mapped, we'll now

Re: [PATCH RFC 01/14] mm/memory: drop highest_memmap_pfn sanity check in vm_normal_page()

2025-07-04 Thread David Hildenbrand
On 03.07.25 16:44, Lance Yang wrote: On 2025/7/3 20:39, David Hildenbrand wrote: On 03.07.25 14:34, Lance Yang wrote: On Mon, Jun 23, 2025 at 10:04 PM David Hildenbrand wrote: On 20.06.25 14:50, Oscar Salvador wrote: On Tue, Jun 17, 2025 at 05:43:32PM +0200, David Hildenbrand wrote: In

Re: [PATCH v2] selftests/mm: pagemap_scan ioctl: add PFN ZERO test cases

2025-07-04 Thread David Hildenbrand
On 02.07.25 16:20, Muhammad Usama Anjum wrote: Add test cases to test the correctness of PFN ZERO flag of pagemap_scan ioctl. Test with normal pages backed memory and huge pages backed memory. Cc: David Hildenbrand Signed-off-by: Muhammad Usama Anjum --- The bug has been fixed [1]. [1] https

Re: [PATCH RFC 01/14] mm/memory: drop highest_memmap_pfn sanity check in vm_normal_page()

2025-07-03 Thread David Hildenbrand
On 03.07.25 14:34, Lance Yang wrote: On Mon, Jun 23, 2025 at 10:04 PM David Hildenbrand wrote: On 20.06.25 14:50, Oscar Salvador wrote: On Tue, Jun 17, 2025 at 05:43:32PM +0200, David Hildenbrand wrote: In 2009, we converted a VM_BUG_ON(!pfn_valid(pfn)) to the current highest_memmap_pfn

Re: [PATCH v2 5/7] selftests/mm: Fix child process exit codes in ksm_functional_tests

2025-07-03 Thread David Hildenbrand
On 03.07.25 10:51, Donet Tom wrote: Hi David On 7/3/25 2:03 PM, David Hildenbrand wrote: On 03.07.25 08:06, Aboorva Devarajan wrote: In ksm_functional_tests, test_child_ksm() returned negative values to indicate errors. However, when passed to exit(), these were interpreted as large unsigned

Re: [PATCH v2 7/7] selftests/mm: Skip hugepage-mremap test if userfaultfd unavailable

2025-07-03 Thread David Hildenbrand
ksft_exit_skip("userfaultfd is not supported/not enabled.\n"); + break; Note that we have in tools/testing/selftests/mm/config CONFIG_USERFAULTFD=y But I don't have anything about making the test more versatile. Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 6/7] selftests/mm: Skip thuge-gen if shmmax is too small or no 1G huge pages

2025-07-03 Thread David Hildenbrand
e-gen ~ SKIP Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 5/7] selftests/mm: Fix child process exit codes in ksm_functional_tests

2025-07-03 Thread David Hildenbrand
MORY_MERGE value is inherited # [RUN] test_prctl_unmerge ok 9 Pages were unmerged # Totals: pass:9 fail:0 xfail:0 xpass:0 skip:0 error:0 ^ huh, what now? -- Cheers, David / dhildenb

Re: [PATCH v2 5/7] selftests/mm: Fix child process exit codes in ksm_functional_tests

2025-07-03 Thread David Hildenbrand
failed - Totals: pass:7 fail:2 xfail:0 xpass:0 skip:0 error:0 Fixes: 6c47de3be3a0 ("selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec") Signed-off-by: Aboorva Devarajan Surprising, but seems to be the right thing to do. Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 4/7] mm/selftests: Fix split_huge_page_test failure on systems with 64KB page size

2025-07-03 Thread David Hildenbrand
lt; max_order; i++) for (offset = 0; offset < pmd_pagesize / pagesize; offset += MAX(pmd_pagesize / pagesize / 4, 1 << i)) -- Cheers, David / dhildenb

Re: [PATCH v2 2/7] selftests/mm: Add support to test 4PB VA on PPC64

2025-07-03 Thread David Hildenbrand
_LOW NR_CHUNKS_128TB +#define NR_CHUNKS_HIGH NR_CHUNKS_3968TB #else #define HIGH_ADDR_MARK ADDR_MARK_128TB #define HIGH_ADDR_SHIFT 48 Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 1/7] mm/selftests: Fix incorrect pointer being passed to mark_range()

2025-07-03 Thread David Hildenbrand
MAP_FAILED) break; - mark_range(ptr[i], MAP_CHUNK_SIZE); + mark_range(hptr[i], MAP_CHUNK_SIZE); validate_addr(hptr[i], 1); } hchunks = i; Acked-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH] selftests/mm: pagemap_scan ioctl: add PFN ZERO test cases

2025-07-02 Thread David Hildenbrand
On 02.07.25 09:39, Muhammad Usama Anjum wrote: On 7/1/25 7:51 PM, David Hildenbrand wrote: On 30.06.25 12:24, Muhammad Usama Anjum wrote: Add test cases to test the correctness of PFN ZERO flag of pagemap_scan ioctl. Test with normal pages backed memory and huge pages backed memory. Just to

Re: [PATCH v2 3/5] binder: Scaffolding for binder_alloc KUnit tests

2025-07-01 Thread David Gow
v2: > * Added tested-by tag > --- This looks great, thanks. One small request: could we split the change to expose kunit_attach_mm() into a separate commit? That'd make it easier for people to backport independently of binder changes if other tests want to use this, too. Cheers

  1   2   3   4   5   6   7   8   9   10   >