<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in char-mem.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>c5fd5e67c7812bc40cd897422c1e0d6dd9ed1e2e - Merge tag &apos;mm-stable-2026-10-19-21-33&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
        <link>http://kernelsources.org:8080/source/history/linux/mm/char-mem.c#c5fd5e67c7812bc40cd897422c1e0d6dd9ed1e2e</link>
        <description>Merge tag &apos;mm-stable-2026-10-19-21-33&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mmPull MM updates from Andrew Morton: - &quot;selftests/mm: improve khugepaged coverage&quot; (Kiryl Shutsemau):   Give khugepaged a proper workout. Extend the tests to all supported   mTHP orders, check exactly which windows collapsed, and make scan   completion deterministic. Race collapse against faults, pinning, fork   and remap; verify that the contents survive.   Add coverage for whole-page-table zaps and memory pressure too. - &quot;selftests/mm: separate GUP microbenchmarking from functional testing&quot;   (Sarthak Sharma):   Untangle GUP benchmarking from correctness testing. Move the   benchmark into tools/mm, add a standalone harness-based GUP selftest,   and move shared helpers into tools/lib/mm. Give each tool one job   instead of mixing timing measurements with correctness checks.   Cover the mapping, pinning and batch-size combinations explicitly. - &quot;mm: Switch device DAX to section-based vmemmap optimization&quot; (Muchun   Song):   Apply section-based vmemmap optimization to device DAX. Rework the   backing metadata layout to save memory while preserving the handling   of device memory hotplug and its different alignment and lifetime   requirements. - &quot;mm: Introduce section-based vmemmap optimization for HugeTLB&quot;   (Muchun Song):   Cut the memory consumed by HugeTLB&apos;s struct page array with   section-based vmemmap optimization. Arrange the metadata so large   huge pages need fewer backing pages, while keeping initialization,   teardown and the various hugepage configurations straight. - &quot;mm/huge_memory: clean up and decouple the anon and file split   helpers&quot; (Kairui Song):   Separate anonymous and file-backed folio splitting, which have rather   different locking and bookkeeping requirements. Move the work into   separate helpers, drop dead checks and tidy swap-cache handling. Fix   error paths, including one that could leave a folio frozen.   Keep the swap cache cases separate from file-cache splitting. - &quot;mm: Unconditional per-VMA locks and cleanups&quot; (Dave Hansen):   Make per-VMA locking unconditional and clean up the old conditional   code around it. This removes configuration-dependent plumbing and   lets callers depend on one locking model rather than carrying both   cases along. - &quot;memcg: remove the v1 soft limit&quot; (Shakeel Butt):   Remove the old cgroup v1 memory soft-limit machinery. This has long   since been superseded by the newer memory-control interfaces; hauling   around a separate reclaim scheme for it no longer buys us much. - &quot;read proc/pid/smaps_rollup under per-vma lock&quot; (Suren Baghdasaryan):   Read /proc/PID/smaps_rollup using per-VMA locks where possible,   rather than holding mmap_lock across the entire walk. Retain the   contention fallback and add tearing tests. This considerably reduces   latency when another thread is busy changing its mappings. - &quot;mm/damon: introduce data access-as-a-data attribute&quot; (SJ Park):   Teach DAMON to expose memory access observations as data attributes,   making them available to the probe and filtering machinery. Extend   the interfaces, documentation and tests so the new information can be   used rather than merely collected. - &quot;Remove PG_private by using page/folio-&gt;private checks instead&quot; (Zi   Yan):   Get rid of PG_private and use the folio&apos;s private pointer to say   whether private data is attached. Convert the filesystem users,   including erofs, f2fs and md, and clean up the old accessors and   flags. There are a few special cases, notably swapcache and hugetlb,   which need explicit care. - &quot;mm: make userland page table freeing RCU-safe&quot; (Lorenzo Stoakes):   Make freeing userspace page tables safe against RCU readers. Sort out   the page-table lifetime and locking rules so walkers cannot stumble   over freed tables while mappings are being torn down. - &quot;make unused huge shrinker memcg aware&quot; (Qi Zheng):   Make shmem&apos;s unused-huge-folio shrinker aware of memory cgroups, so   reclaim can find those folios under the right memcg. Wire up the   per-memcg tracking and its lifetime rules, and give the shrinklist   its own lockdep class to avoid spurious dependency reports. - &quot;mm: Drop pxd_ERROR()&quot; (Anshuman Khandual):   Remove the old pxd_ERROR() page-table checks and their   architecture-specific baggage. Simplify the common page-table   interfaces and callers now that these checks no longer serve a   useful purpose. - &quot;memcg: group struct fields by access pattern&quot; (Shakeel Butt):   Rearrange memcg&apos;s hot and cold fields according to how they&apos;re   actually accessed. Keep frequently updated counters and their   neighboring state from fighting over cachelines and reduce needless   cacheline traffic. - &quot;mm/damon/core: fix the size charged for a filter-trimmed region&quot;   (Donggeun Yoo):   Fix DAMOS quota accounting when a filter trims a monitoring region.   Charge only the part left after filtering, not the original region,   and add KUnit coverage. Previously the excluded memory could eat into   the quota and make schemes run more slowly than requested. - &quot;mm/damon: add kunit and selftests for probes and probe weights&quot; (SJ   Park):   Add more tests for DAMON probes and their weights, including   validation and the results reported to userspace. This is mostly   about catching regressions in the newer probe infrastructure before   they become harder to diagnose. - &quot;mm: memcontrol: constify the read side of the read side of the memcg   API&quot; (Tal Zussman):   Mark the read-only parts of the memcg interface const, from folio and   lruvec accessors to counters and swap helpers. Most of this is   mechanical, but it makes the contracts clearer and lets the compiler   catch accidental writes. - &quot;mm/damon/vaddr: support {prep,apply}_probes&quot; (SJ Park):   Support the new prepare/apply probe operations in DAMON&apos;s   virtual-address backend. This brings vaddr monitoring into line with   the probe infrastructure and makes the added probe types useful there   too. - &quot;mm/mglru: clean up folio counters and flag usage&quot; (Kairui Song):   Simplify MGLRU&apos;s folio counters and flag handling. Remove redundant   accounting paths and make the state transitions easier to follow   without changing the intended reclaim policy. - &quot;arch, mm/execmem: resolve confusion about set_direct_map_valid_noflush()&quot;   (Mike Rapoport (Microsoft)):   Clarify and straighten out the set_direct_map_valid_noflush()   interface across architectures and execmem. Make the requested   mapping changes and the callers&apos; expectations agree, rather than   relying on subtly different architecture behavior. - &quot;mm: zswap: free cold writeback folios promptly&quot; (Alexandre Ghiti):   Free zswap writeback folios as soon as their disk write completes.   They are cold temporary buffers, so putting them on the LRU only   makes reclaim rediscover them later. Extend swap-cache dropbehind and   let zswap keep these folios off the LRU altogether. - &quot;mm: gup: cleanup gup_fast call chain&quot; (Aristeu Rozanski):   Clean up the GUP-fast call chain and simplify how the fast-path   helpers pass their arguments and results around. Keep the page-pin   behavior the same while making the call sequence easier to maintain. - &quot;mm: optimize zone-device memmap initialization&quot; (Li Zhe):   Speed up initialization of zone-device struct pages. Avoid redundant   work when setting up large device-memory ranges, where touching every   descriptor can get expensive. - &quot;mm/zswap: shrink zswap_entry via a pool id&quot; (Jianyue Wu):   Reduce the size of zswap_entry by storing a compact pool identifier   instead of a full pointer. Keep the pool lookup and lifetime handling   correct while saving per-entry metadata. - &quot;mm/damon: support access monitoring of hugetlb-backed memory&quot;   (Krishna Iyer):   Let DAMON monitor hugetlb-backed memory too. Extend the relevant   access checks and add coverage so those mappings no longer fall   through a hole in the monitoring machinery. - &quot;mm/execmem: fixes and cleanups for the ROX cache&quot; (Mike Rapoport):   Tidy execmem&apos;s read-only-executable cache and fix its handling of the   awkward allocation and release cases. The aim is to make the cache&apos;s   ownership and permission transitions more predictable. - &quot;zsmallc: remove old object read API&quot; (Sergey Senozhatsky):   Drop zsmalloc&apos;s old object-read API and move its remaining users to   the supported access mechanism. This removes a duplicate interface   which we no longer need. - &quot;mm/mempolicy: stop copying state in the interleave paths&quot; (Gregory   Price):   Stop copying mempolicy state in the interleave paths when a reference   to the existing policy will do. This avoids extra work and makes the   ownership rules less obscure. - &quot;mm/mglru: speed up inc_min_seq() and fix cold/hot inversions&quot; (Barry   Song):   Make MGLRU&apos;s generation advancement cheaper and fix cases where cold   and hot folios end up in the wrong order. Adjust the counter and list   handling so reclaim doesn&apos;t keep passing over the better eviction   candidates. - &quot;mm: Fix MF_DELAYED handling on memory failure&quot; (Lisa Wang):   Treat MF_DELAYED as a partially completed memory-failure operation,   not an outright failure. Propagate that result correctly through   shmem and the generic handler, fix the extra-reference accounting,   and add tests for the resulting SIGBUS behavior. - &quot;tools/mm/page_owner_sort: fix --sort, add module filter, improve   usage&quot; (Ye Liu):   Fix page_owner_sort&apos;s --sort handling, add module-based filtering and   make the usage output more helpful. This makes the tool less   frustrating when tracking down who is holding on to pages. - &quot;mm/damon: move damos filter range arguments validation to core&quot; (SJ   Park):   Move DAMOS filter range validation into the core, where all callers   can share it. Also close the sysfs read-twice races which could pass   inconsistent ranges, and add tests for invalid input. - &quot;mm/damon: misc cleanups&quot; (Zenghui Yu):   Clean up a collection of small DAMON rough edges in the core,   interfaces and tests. No large behavior change here, just simpler   code and fewer opportunities for confusion. - &quot;mm/damon: cleanup code, add test cases, and update guidances in   docs&quot; (SJ Park):   Clean up DAMON&apos;s core and interfaces, add missing test cases and   bring the documentation into line with the code. These changes should   make the newer facilities easier to understand and maintain. - &quot;mm/damon: introduce hugepage_size probe filter&quot; (SJ Park):   Add a DAMON probe filter for hugepage size. Let users select a range   of folio sizes through sysfs, validate the range and document the new   interface, so monitoring can concentrate on memory backed by the   desired hugepage sizes. - &quot;selftests/mm: pagemap_ioctl test fixes and cleanups&quot; (Zenghui Yu):   Fix some pagemap ioctl test assumptions and clean up their setup and   reporting. Make failures point to the operation that went wrong   rather than to test harness bookkeeping. - &quot;mm: avoid large folio splits when swap is unavailable&quot; (Johannes   Weiner):   Avoid splitting large folios merely to attempt swap when no swap   space is available. There is little point paying for an expensive   split when reclaim cannot actually swap the resulting pages out. - &quot;mm: workingset: fix the shadow node budget under MGLRU&quot; (Hui Zhu):   Fix the workingset shadow-node budget with MGLRU enabled. Keep the   shadow entries within the intended limits so refault tracking does   not quietly consume more metadata than it should. - &quot;selftests/mm: TAP output and global-state fixes&quot; (Song Hu):   Fix selftests which produce misleading TAP output or fail to restore   global settings after a run. A test ought to leave the system as it   found it, particularly when a whole suite follows behind. - &quot;mm: remove page_swap_entry()&quot; (Tal Zussman):   Remove page_swap_entry() and convert its remaining users to the folio   and swap-entry helpers. Lose an old page-level interface and make the   swap paths a little more consistent. - &quot;mm: refactor zonelist constructors and iterators&quot; (Gregory Price):   Refactor the zonelist construction and walk helpers to reduce   duplicated logic. Keep the allocation ordering rules intact while   making it clearer how zones are selected. - &quot;mm: kmemleak: batch the struct page scan&quot; (Breno Leitao):   Scan adjacent struct pages in batches instead of taking kmemleak_lock   once for every single page. This preserves scan coverage and the   lock-hold bound, while cutting overhead substantially on debug   kernels. - &quot;mm/damon: misc improvements in tests and documents&quot; (Zenghui Yu):   Fix some DAMON selftests which leave kdamond running or fail under   Python safe-path mode, and improve the KUnit coverage and   documentation. Nothing especially glamorous, but these are worth   doing. - &quot;mm/damon: introduce probe_hits_wsum DAMOS core filter&quot; (SJ Park):   Add a DAMOS core filter using weighted probe-hit counts. This gives   schemes another way to select regions based on what the monitoring   probes observed. - &quot;mm/mglru: fix ineffective memory protection for non-kswapd reclaim&quot;   (Ridong Chen):   Fix MGLRU&apos;s memory protection handling for reclaim outside kswapd.   The protection settings weren&apos;t having the intended effect in these   paths, leaving protected memory more exposed than requested. - &quot;mm/damon: improve readability, clarity and test coverage&quot; (SJ Park):   Simplify a handful of DAMON core helpers, clarify their behavior and   expand test coverage. There are no intended userspace-visible changes   in this batch. - &quot;mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func()&quot; (Kefeng   Wang):   Stop identifying reclaim and compaction workers through the PF_KSWAPD   and PF_KCOMPACTD task flags. Use their kthread functions instead and   remove the redundant flag plumbing. - &quot;mm/hugetlb: fix surplus accounting and availability checks during   demotion&quot; (Longlong Xia):   Fix HugeTLB surplus accounting and availability checks when demoting   huge pages. Keep the counters and reservation decisions consistent as   one huge page turns into several smaller ones. - &quot;mm/damon: add kunit tests for probe_hits handling and probe params   validation&quot; (Jason Angelov):   Add KUnit tests for DAMON probe-hit handling and invalid probe   parameters. These cover edge cases that were too easy to miss in   ordinary monitoring tests. - &quot;mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms&quot;   (SJ Park):   Fix a few DAMON bugs in KUnit tests, quota-goal handling and the   sysfs refresh interval. Small fixes, but the incorrect results and   control behavior were real. - &quot;mm: zswap: optimize zswap invalidate and store&quot; (Kefeng Wang):   Simplify zswap&apos;s invalidate and store paths to avoid avoidable   lookups and work. Keep the entry lifetime rules intact while making   those frequent operations cheaper. - &quot;mm: replace custom ratelimiting logic&quot; (Pedro Falcato):   Replace hand-rolled MM rate limiting with the common kernel helpers.   There is no need to maintain another local version of the same   mechanism. - &quot;mm/vmalloc: minor cleanups&quot; (Ye Liu):   Tidy some vmalloc initialization and reporting code, and pull   duplicated vmap-area insertion work into a helper. No functional   changes are intended. - &quot;mm/mglru: clean up isolate_folios for readability and clarity&quot;   (Ridong Chen):   Clean up MGLRU&apos;s isolate_folios() so the decisions are easier to read   and verify. Keep reclaim behavior unchanged while removing   unnecessary twists in the control flow. - &quot;Catch automatic storage in IDA and Maple Tree definitions&quot; (Yury   Norov):   Catch IDA and maple-tree definitions placed in automatic storage   where the lifetime rules are wrong or easy to get wrong. Add checks   so such mistakes are harder to slip through unnoticed. - &quot;mm, swap: some random fixes and cleanups&quot; (Kemeng Shi):   Fix and simplify a few unrelated swap paths, removing redundant work   and tidying up error handling. A small collection of things which   were better fixed than left lying around. - &quot;mm/page_io: folio conversion cleanups&quot; (Tal Zussman):   Finish some page-to-folio conversions in swap I/O, removing obsolete   wrappers and using folio operations consistently. The I/O behavior is   intended to remain the same. - &quot;mm/swap: skip empty clusters in the swapoff scan&quot; (Youngjun Park):   Skip empty swap clusters during swapoff instead of walking slots   which have nothing to release. This avoids pointless work on sparsely   used swap devices. - &quot;mm: trace: decode architecture-specific VMA flags&quot; (Meijing Zhao):   Teach the VMA trace output to decode architecture-specific flags,   rather than leaving them as unexplained bits. That should make   tracing a good deal more useful when debugging unusual mappings. - &quot;mm, swap: don&apos;t spin on a bad swap entry&quot; (Breno Leitao):   Stop repeatedly retrying a swap entry which is already known to be   bad. Make the error path terminate cleanly instead of wasting CPU   chasing an entry that cannot be used. - &quot;mm/page_isolation: fix UBSAN shift-out-of-bounds in   isolate_single_pageblock&quot; (Qi Xi):   Fix an out-of-range shift in isolate_single_pageblock() and tighten   its associated boundary handling. UBSAN found the issue; the result   should be more robust pageblock isolation. - &quot;mm: khugepaged: fix tracepoint UAF&quot; (Vernon Yang):   Fix a use-after-free in khugepaged tracepoint handling. Make sure the   information recorded by tracing stays valid for as long as the trace   event needs it. - &quot;mm/damon: fix DAMOS bugs in core, paddr and vaddr&quot; (SJ Park):   Fix several DAMOS problems across the core and physical- and   virtual-address backends. The changes close error cases and bring the   implementations back into agreement. - &quot;mm/hugetlb_cgroup: move the per-node usage along with the folio&quot;   (Hongfu Li):   Move HugeTLB per-node usage accounting when folios migrate between   nodes or are reparented to another cgroup. Otherwise numa_stat can   retain stale charges and even underflow when the folio is freed. - &quot;docs/core-api: memory-allocation: add k[mz]alloc_obj() and clarify   kmalloc&quot; (Mike Rapoport):   Document the typed k[mz]alloc_obj() allocation helpers and clear up   some kmalloc guidance. Make it easier for callers to choose the right   interface. - &quot;selftests/mm: Validate selections and scope memfd_secret setup&quot;   (Tianyi Chen):   Check selftest selections before running and confine memfd_secret   setup to the cases that actually need it. Avoid confusing failures   caused by the test harness itself. - &quot;mm/damon: move zero damos quota target_value handling to the core   layer&quot; (SJ Park):   Handle a zero DAMOS quota goal target in the core rather than making   each user of the interface invent its own rule. Keep quota decisions   consistent across callers. - &quot;mm/damon: Introduce a huge page collapsing mechanism using auto   tuning&quot; (Asier Gutierrez):   Add an auto-tuned DAMON mechanism for collapsing huge pages. Use   monitoring feedback to decide when collapse is worthwhile rather than   forcing one fixed policy onto every workload. - &quot;kmemleak: fix stale documentation and raise the verbose default&quot;   (Breno Leitao):   Bring the kmemleak documentation up to date and require a third   confirming scan before verbose kernels print a suspected leak. The   extra scan helps suppress transient false positives in noisy debug   builds. - &quot;mm/memory: improve insert_pages() error handling&quot; (Avi Weiss):   Tighten insert_pages() error handling so partial failures are   reported and cleaned up consistently. The caller should not have to   guess how far the operation got. - &quot;mm/damon: allow NULL or unstarted damon_ctx parameter for   damon_call()&quot; (SJ Park):   Make damon_call() handle NULL and not-yet-started contexts safely.   Simplify the rules for callers and avoid an indefinite wait on an   invalid state. - &quot;mm/damon: introduce pgidle_set probe filter type&quot; (SJ Park):   Add a pgidle_set DAMON probe filter, giving monitoring users another   way to select pages by their idle-tracking state. Wire it through the   filter interfaces and tests. - &quot;mm/damon/core: remove unused helper functions&quot; (Cheng-Han Wu):   Remove DAMON core helpers which no longer have callers. Keep the API   surface smaller rather than retaining dead code just in case. - &quot;mm: stop calling pmd_folio() on special PMDs&quot; (Gregory Price):   Avoid calling pmd_folio() on special PMD mappings that have no struct   page. The old assumption could fault in procfs walkers; use the   normal-folio checks and handle those mappings properly. - &quot;mm: remove three unused helpers from mm.h&quot; (Tal Zussman):   Remove three unused helpers from mm.h. Fewer obsolete interfaces for   the next person to stumble over. - &quot;mm/damon: improvements in efficiency, error handling, documents&quot;   (Liew Rui Yan):   Skip needless DAMOS quota work once the quota is full, propagate a   missing sysfs error and tidy a couple of comments. The ignored error   could make a monitoring-start request appear successful when it   wasn&apos;t. - &quot;docs/mm/damon/design: add explanation of nr_snapshots&quot; (Liew Rui   Yan):   Explain DAMON&apos;s nr_snapshots accounting in the design documentation   and straighten out the associated terminology. Make it clearer what   users should expect from that counter. - &quot;selftests/cgroup: fixes for test_zswap on single core VM&quot; (Wilson   Felipe Pereira):   Fix two test_zswap failures on single-CPU VMs. Wait for the exiting   child&apos;s cgroup to become unpopulated before reconfiguring it, and   avoid another test assumption which breaks under constrained   scheduling. - &quot;docs/ksm: fix advisor documentation and comment&quot; (Jinjiang Tu):   Correct the KSM advisor documentation and a misleading code comment.   Keep the description aligned with how the advisor actually works. - &quot;Fix bugs in HugeTLB allocation when mem_cgroup_charge_hugetlb()   fails&quot; (Ackerley Tng):   Fix HugeTLB allocation cleanup when the memcg charge fails. Make sure   failure exits undo what was allocated rather than leaving stale   accounting or resources behind. - &quot;mm, memcg: fix memory.peak reset clobbering other fds&apos; watermark&quot;   (Ridong Chen):   Fix memory.peak reset handling so resetting one file descriptor   doesn&apos;t overwrite the watermark kept for another. Keep those per-open   measurements independent as intended. - &quot;mm: reject zone device folios in more folio walkers&quot; (Gregory   Price):   Reject zone-device folios in page walkers that cannot safely handle   them. Extend the existing checks rather than assuming every folio has   ordinary system-memory backing. - &quot;percpu: remove code with no effect&quot; (Sang-Heon Jeon):   Remove a few pieces of percpu code which no longer do anything. There   is no reason to keep maintaining dead paths.* tag &apos;mm-stable-2026-10-19-21-33&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (539 commits)  mm: shmem: assign a lock class to the unused huge shrinklist  mm: vmscan: put rotation-missed folios at the LRU tail  mm: kmemleak: scan the struct page array in MAX_SCAN_SIZE batches  mm: kmemleak: move the struct page scan into a helper  mm/damon: document that a zero sample_interval is accepted  mm/damon: fix typos in comments  mm/damon/sysfs: propagate damon_call() error in turn_damon_on  mm/damon/core: skip quota score setup when the quota is full  mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region  mm/damon/core: charge only the part of a region the filter left  mm: disallow raw PFN mappings of huge/shared zeropage  selftests/mm: zap whole PTE tables in the khugepaged race harness  selftests/mm: add memory-pressure threads to the khugepaged race harness  selftests/mm: race the collapse of windows with holes  selftests/mm: add khugepaged race harness  selftests/mm: check that one khugepaged pass collapses one window  selftests/mm: run every supported collapse order by default  selftests/mm: cover a shared-source collapse write race  selftests/mm: parameterize the mixed-source collapse case by source order  selftests/mm: add order-parameterized khugepaged collapse cases  ...

            List of files:
            /linux/mm/char-mem.c</description>
        <pubDate>Fri, 23 Oct 2026 19:42:11 +0200</pubDate>
        <dc:creator>Linus Torvalds &lt;torvalds@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>fe73aa910ea53ed557998229fd1c124d88bd7625 - mm/vma: only permit MAP_PRIVATE /dev/zero to be mapped anonymous</title>
        <link>http://kernelsources.org:8080/source/history/linux/mm/char-mem.c#fe73aa910ea53ed557998229fd1c124d88bd7625</link>
        <description>mm/vma: only permit MAP_PRIVATE /dev/zero to be mapped anonymousIn order to use mmap_prepare() with MAP_PRIVATE mappings of /dev/zerowithout the success_hook hack we explicitly permitted mmap_prepare handlersto set NULL vm_ops.However this is dangerous and we really only want to allow this forMAP_PRIVATE-mapped /dev/zero.Therefore use the newly introduced file_is_dev_zero() to uniquely identifyMAP_PRIVATE-/dev/zero mappings and only permit this behaviour for them.Then, remove all ability for mmap_prepare or mmap hooks to set a VMAanonymous and update mmap_zero_prepare() to leave it to the core mmap codeto do so.Note that this disallows nested MAP_PRIVATE-mappings of /dev/zeroregions. Doing this would be broken in any case.We therefore do not need to update the mmap_prepare() compatibility layerto reflect these changes, as the mmap hook check suffices to disallow thisbehaviour.Now we&apos;re setting vma-&gt;vm_ops to NULL for an mmap_prepare-initialisedMAP_PRIVATE-/dev/zero mapping, we have to avoid a subtle issue whenupdating user-defined fields via set_vma_user_defined_fields().The default for vma-&gt;vm_ops for all mmap_prepare-initialised mappings isvma_dummy_vm_ops, so map-&gt;vm_ops will be set to this and settingvma-&gt;vm_ops to this will render the VMA mistakenly non-anon.In general, we should never be setting user-defined fields for an anonymousVMA, so explicitly check for this to avoid doing so for the one case wherea mapping can be both mmap_prepare and anonymous.In the case of legacy -&gt;mmap hooks some drivers may set vma-&gt;vm_ops NULLbelieving this is the equivalent of setting no VMA operations. Thereforeupdate mmap_file() to correct this by setting dummy VMA operations if thisoccurs.An example of this is drm_gem_shmem_mmap() which deliberately clearsvma-&gt;vm_ops before handing the VMA to dma-buf. Cases such as this will beupdated when they are converted to mmap_prepare.Also, in order to avoid a single commit bisection hazard, add a temporaryworkaround to set the VMA anonymous only after vma-&gt;vm_file is assigned in__mmap_new_file_vma().This is because vma_set_range() calls vma_set_pgoff() andassert_sane_pgoff() in turn, prior to the vma-&gt;vm_file being assigned. Ifwe set the VMA anonymous early then this assert will fail.This is removed in the subsequent commit.Link: https://lore.kernel.org/20260926-map-private-dev-zero-v3-3-d4781e84ccfc@kernel.orgSigned-off-by: Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Acked-by: David Hildenbrand (Arm) &lt;david@kernel.org&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Cc: Liam R. Howlett &lt;liam@infradead.org&gt;Cc: Vlastimil Babka &lt;vbabka@kernel.org&gt;Cc: Jann Horn &lt;jannh@google.com&gt;Cc: Pedro Falcato &lt;pfalcato@suse.de&gt;Cc: Mike Rapoport &lt;rppt@kernel.org&gt;Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;Cc: Michal Hocko &lt;mhocko@suse.com&gt;Cc: Hugh Dickins &lt;hughd@google.com&gt;Cc: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;Cc: Jan Kara &lt;jack@suse.cz&gt;

            List of files:
            /linux/mm/char-mem.c</description>
        <pubDate>Sat, 26 Sep 2026 12:41:08 +0200</pubDate>
        <dc:creator>Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>4b019e056f6cbc6e8a5d0525a5e0d48d55b5e2dc - mm: implement file_is_dev_zero() to uniquely identify /dev/zero</title>
        <link>http://kernelsources.org:8080/source/history/linux/mm/char-mem.c#4b019e056f6cbc6e8a5d0525a5e0d48d55b5e2dc</link>
        <description>mm: implement file_is_dev_zero() to uniquely identify /dev/zeroTo lay the foundation for a future change that convertsMAP_PRIVATE-/dev/zero mappings to be truly anonymous, add the ability touniquely identify these mappings.With the memory character device now part of mm/ this is triviallyachievable through a file_is_dev_zero() predicate that simply tests thatthe file operation hooks are zero_fops.Also update userland VMA tests to expose file_is_dev_zero() and providea stub zero_fops for testing.Link: https://lore.kernel.org/20260926-map-private-dev-zero-v3-2-d4781e84ccfc@kernel.orgSigned-off-by: Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Acked-by: David Hildenbrand (Arm) &lt;david@kernel.org&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Cc: Liam R. Howlett &lt;liam@infradead.org&gt;Cc: Vlastimil Babka &lt;vbabka@kernel.org&gt;Cc: Jann Horn &lt;jannh@google.com&gt;Cc: Pedro Falcato &lt;pfalcato@suse.de&gt;Cc: Mike Rapoport &lt;rppt@kernel.org&gt;Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;Cc: Michal Hocko &lt;mhocko@suse.com&gt;Cc: Hugh Dickins &lt;hughd@google.com&gt;Cc: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;Cc: Jan Kara &lt;jack@suse.cz&gt;

            List of files:
            /linux/mm/char-mem.c</description>
        <pubDate>Sat, 26 Sep 2026 12:41:07 +0200</pubDate>
        <dc:creator>Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>9ee6e52616a3231a34236220fb901675fda40291 - mm: move drivers/char/mem.c to mm/char-mem.c</title>
        <link>http://kernelsources.org:8080/source/history/linux/mm/char-mem.c#9ee6e52616a3231a34236220fb901675fda40291</link>
        <description>mm: move drivers/char/mem.c to mm/char-mem.cThe memory character driver implements several mm-specific features and isalways compiled into the kernel, so move it to mm/ where it belongs.Among other things the driver implements /dev/mem which provides raw accessto physical memory, and /dev/zero which either allows mapping of a shmemregion (if mapped with MAP_SHARED) or, uniquely, anonymous memory (ifmapped MAP_PRIVATE).This change lays the foundations to allow MAP_PRIVATE-/dev/zero to bemapped precisely the same as anonymous memory is mapped as currently it isan edge case within mm.Also update a couple of comments that reference &apos;drivers/char/mem.c&apos; toreference &apos;mm/char-mem.c&apos;.Link: https://lore.kernel.org/20260926-map-private-dev-zero-v3-1-d4781e84ccfc@kernel.orgSigned-off-by: Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Acked-by: David Hildenbrand (Arm) &lt;david@kernel.org&gt;Acked-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Cc: Liam R. Howlett &lt;liam@infradead.org&gt;Cc: Vlastimil Babka &lt;vbabka@kernel.org&gt;Cc: Jann Horn &lt;jannh@google.com&gt;Cc: Pedro Falcato &lt;pfalcato@suse.de&gt;Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;Cc: Michal Hocko &lt;mhocko@suse.com&gt;Cc: Hugh Dickins &lt;hughd@google.com&gt;Cc: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;Cc: Jan Kara &lt;jack@suse.cz&gt;

            List of files:
            /linux/mm/char-mem.c</description>
        <pubDate>Sat, 26 Sep 2026 12:41:06 +0200</pubDate>
        <dc:creator>Lorenzo Stoakes (ARM) &lt;ljs@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
