All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Jann Horn <jannh@google.com>,
	 Pedro Falcato <pfalcato@suse.de>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	 Jan Kara <jack@suse.cz>, Miaohe Lin <linmiaohe@huawei.com>,
	 Naoya Horiguchi <nao.horiguchi@gmail.com>,
	Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
	 Lance Yang <lance.yang@linux.dev>, Kees Cook <kees@kernel.org>,
	Zi Yan <ziy@nvidia.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	Nico Pache <npache@redhat.com>,
	 Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>,
	 Usama Arif <usama.arif@linux.dev>,
	Matthew Brost <matthew.brost@intel.com>,
	 Joshua Hahn <joshua.hahnjy@gmail.com>,
	Rakie Kim <rakie.kim@sk.com>, Byungchul Park <byungchul@sk.com>,
	 Gregory Price <gourry@gourry.net>,
	Ying Huang <ying.huang@linux.alibaba.com>,
	 Alistair Popple <apopple@nvidia.com>,
	Peter Xu <peterx@redhat.com>, Xu Xin <xu.xin16@zte.com.cn>,
	 Chengming Zhou <chengming.zhou@linux.dev>,
	Arnd Bergmann <arnd@arndb.de>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 13/15] mm/vma: make MAP_PRIVATE-mapped /dev/zero mappings truly anonymous
Date: Mon, 27 Jul 2026 13:03:16 +0100	[thread overview]
Message-ID: <amdI42D5Y_nsB1t_@lucifer> (raw)
In-Reply-To: <9d2c8f26-aaee-459f-b73f-d07d8671e805@sirena.org.uk>

On Mon, Jul 27, 2026 at 12:48:57PM +0100, Mark Brown wrote:
> On Mon, Jul 20, 2026 at 03:38:39PM +0100, Lorenzo Stoakes (ARM) wrote:
> > When mapping /dev/zero with MAP_PRIVATE, one ends up with strange VMAs
> > originating from Linux's distant past.
> >
> > These have vma->vm_file set but NULL vma->vm_ops, meaning they satisfy
> > vma_is_anonymous() but otherwise resemble a file-backed VMA.
>
> I'm seeing a test failure in the proc proc-self-map-files-0002 kselftest
> which bisects to this change in -next.  The test just says:
>
> # selftests: proc: proc-self-map-files-002
> not ok 11 selftests: proc: proc-self-map-files-002 # exit=1
>
> which isn't super informative.  Full log at:
>
>    https://lava.sirena.org.uk/scheduler/job/3030495#L13846

Thanks, will investigate!

It's likely making some assumptions that no longer apply about MAP_PRIVATE-/dev/zero mappings here.

>
> bisect log:
>
> # bad: [c5e32e86ca02b003f86e095d379b38148999293d] Add linux-next specific files for 20260726
> # good: [692519a077bfb1a66d209e713d2210bb1d9adcaf] Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git
> # good: [ef4f2357df6e9dd6213ce00d01253f3c458d5df0] regmap: clean up kernel-doc comments
> # good: [86e9ba573c353afd1a46816682f4cc3dbabeeb23] irqchip/irq-imgpdc: Remove unused driver
> git bisect start 'c5e32e86ca02b003f86e095d379b38148999293d' '692519a077bfb1a66d209e713d2210bb1d9adcaf' 'ef4f2357df6e9dd6213ce00d01253f3c458d5df0' '86e9ba573c353afd1a46816682f4cc3dbabeeb23'
> # test job: [ef4f2357df6e9dd6213ce00d01253f3c458d5df0] https://lava.sirena.org.uk/scheduler/job/3020719
> # test job: [86e9ba573c353afd1a46816682f4cc3dbabeeb23] https://lava.sirena.org.uk/scheduler/job/2955047
> # test job: [c5e32e86ca02b003f86e095d379b38148999293d] https://lava.sirena.org.uk/scheduler/job/3030495
> # bad: [c5e32e86ca02b003f86e095d379b38148999293d] Add linux-next specific files for 20260726
> git bisect bad c5e32e86ca02b003f86e095d379b38148999293d
> # test job: [673a43d4e283e8fc3bee7a874766278427263bc1] https://lava.sirena.org.uk/scheduler/job/3030777
> # bad: [673a43d4e283e8fc3bee7a874766278427263bc1] Merge branch 'libcrypto-next' of https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
> git bisect bad 673a43d4e283e8fc3bee7a874766278427263bc1
> # test job: [5dd91aac4216c19e9eeea6e0c1a04bcb3e43a876] https://lava.sirena.org.uk/scheduler/job/3031099
> # bad: [5dd91aac4216c19e9eeea6e0c1a04bcb3e43a876] Merge branch 'xtensa-for-next' of https://github.com/jcmvbkbc/linux-xtensa.git
> git bisect bad 5dd91aac4216c19e9eeea6e0c1a04bcb3e43a876
> # test job: [457b365bc545636d75f65067d18afa86f6ced162] https://lava.sirena.org.uk/scheduler/job/3031248
> # bad: [457b365bc545636d75f65067d18afa86f6ced162] Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
> git bisect bad 457b365bc545636d75f65067d18afa86f6ced162
> # test job: [a8fa5c7be42a37866fcc315470df3307f0583c47] https://lava.sirena.org.uk/scheduler/job/3031351
> # good: [a8fa5c7be42a37866fcc315470df3307f0583c47] mm/vma: update create_init_stack_vma() to use vma_flags_t
> git bisect good a8fa5c7be42a37866fcc315470df3307f0583c47
> # test job: [5c9f41c7115f0e16b7e133abca791a4860bee0b6] https://lava.sirena.org.uk/scheduler/job/3031429
> # bad: [5c9f41c7115f0e16b7e133abca791a4860bee0b6] Merge branch 'kbuild-for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
> git bisect bad 5c9f41c7115f0e16b7e133abca791a4860bee0b6
> # test job: [c68210527d235e59afa54bc6aba6ecc532488a82] https://lava.sirena.org.uk/scheduler/job/3031482
> # bad: [c68210527d235e59afa54bc6aba6ecc532488a82] mm: page_alloc: fix non-movable reclaim storm in defrag_mode
> git bisect bad c68210527d235e59afa54bc6aba6ecc532488a82
> # test job: [497078da29fbfe6ae057c020f1e5717ded142471] https://lava.sirena.org.uk/scheduler/job/3031540
> # good: [497078da29fbfe6ae057c020f1e5717ded142471] mm/huge_memory: fold split_folio_to_list_to_order() into split_folio_to_order()
> git bisect good 497078da29fbfe6ae057c020f1e5717ded142471
> # test job: [2afd297a9a621ad41892bc0a05481110f46ebfc2] https://lava.sirena.org.uk/scheduler/job/3031619
> # bad: [2afd297a9a621ad41892bc0a05481110f46ebfc2] tools/testing/vma: add test to assert MAP_PRIVATE-/dev/zero is anon
> git bisect bad 2afd297a9a621ad41892bc0a05481110f46ebfc2
> # test job: [a4beb459e21af80c1d8c37b079686753c21932ca] https://lava.sirena.org.uk/scheduler/job/3031661
> # good: [a4beb459e21af80c1d8c37b079686753c21932ca] mm/vma: introduce VMA virtual page offset field and add helpers
> git bisect good a4beb459e21af80c1d8c37b079686753c21932ca
> # test job: [84bd1aceb0233c3de9064028d31a16ecf50070d9] https://lava.sirena.org.uk/scheduler/job/3031711
> # good: [84bd1aceb0233c3de9064028d31a16ecf50070d9] mm/rmap: track whether the page VMA mapped walk is anonymous
> git bisect good 84bd1aceb0233c3de9064028d31a16ecf50070d9
> # test job: [880b6fe7442df760fe0a726b5f5e568bc6b450b6] https://lava.sirena.org.uk/scheduler/job/3031752
> # good: [880b6fe7442df760fe0a726b5f5e568bc6b450b6] tools/testing/vma: expand VMA merge tests to assert virt pgoff
> git bisect good 880b6fe7442df760fe0a726b5f5e568bc6b450b6
> # test job: [e2ad1c5a1f0a96a4a0435213b0a5cb963dc501c5] https://lava.sirena.org.uk/scheduler/job/3031804
> # good: [e2ad1c5a1f0a96a4a0435213b0a5cb963dc501c5] mm/vma: only permit MAP_PRIVATE /dev/zero to be mapped anonymous
> git bisect good e2ad1c5a1f0a96a4a0435213b0a5cb963dc501c5
> # test job: [9f2782812095787d87ee6b742899ae37966ef0f5] https://lava.sirena.org.uk/scheduler/job/3031854
> # bad: [9f2782812095787d87ee6b742899ae37966ef0f5] mm/vma: make MAP_PRIVATE-mapped /dev/zero mappings truly anonymous
> git bisect bad 9f2782812095787d87ee6b742899ae37966ef0f5
> # first bad commit: [9f2782812095787d87ee6b742899ae37966ef0f5] mm/vma: make MAP_PRIVATE-mapped /dev/zero mappings truly anonymous

Cheers, Lorenzo


  reply	other threads:[~2026-07-27 12:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 14:38 [PATCH v2 00/15] mm/rmap: index MAP_PRIVATE file-backed folios by virt pgoff Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 01/15] mm/vma: introduce VMA virtual page offset field and add helpers Lorenzo Stoakes (ARM)
2026-07-20 15:49   ` Gregory Price
2026-07-20 16:56     ` Lorenzo Stoakes (ARM)
2026-07-20 17:26       ` Gregory Price
2026-07-27 12:03         ` Lorenzo Stoakes (ARM)
2026-07-25  8:08   ` xu.xin16
2026-07-20 14:38 ` [PATCH v2 02/15] mm: introduce linear_virt_page_index() Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 03/15] mm: abstract vma_address() and introduce vma_anon_address() Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 04/15] mm: update print_bad_page_map() to show virtual page index Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 05/15] mm: introduce and use vma_filebacked_address() Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 06/15] mm: propagate VMA virtual page offset on map, remap, split + merge Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 07/15] mm/rmap: track whether the page VMA mapped walk is anonymous Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 08/15] mm: introduce and use linear_folio_page_index() Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 09/15] mm/rmap: use virt pgoff for MAP_PRIVATE file-backed anon folios Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 10/15] tools/testing/vma: expand VMA merge tests to assert virt pgoff Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 11/15] tools/testing/selftests/mm: test virtual page offset merge behaviour Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 12/15] mm/vma: only permit MAP_PRIVATE /dev/zero to be mapped anonymous Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 13/15] mm/vma: make MAP_PRIVATE-mapped /dev/zero mappings truly anonymous Lorenzo Stoakes (ARM)
2026-07-27 11:48   ` Mark Brown
2026-07-27 12:03     ` Lorenzo Stoakes (ARM) [this message]
2026-07-20 14:38 ` [PATCH v2 14/15] tools/testing/vma: add test to assert MAP_PRIVATE-/dev/zero is anon Lorenzo Stoakes (ARM)
2026-07-20 14:38 ` [PATCH v2 15/15] tools/testing/selftests/mm: add MAP_PRIVATE-/dev/zero merge tests Lorenzo Stoakes (ARM)
2026-07-20 19:48 ` [PATCH v2 00/15] mm/rmap: index MAP_PRIVATE file-backed folios by virt pgoff Andrew Morton
2026-07-27 12:04   ` Lorenzo Stoakes (ARM)
2026-07-27 14:44 ` David Hildenbrand (Arm)
2026-07-27 15:57   ` Lorenzo Stoakes (ARM)
2026-07-27 15:59     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amdI42D5Y_nsB1t_@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=broonie@kernel.org \
    --cc=byungchul@sk.com \
    --cc=chengming.zhou@linux.dev \
    --cc=david@kernel.org \
    --cc=dev.jain@arm.com \
    --cc=gourry@gourry.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=harry@kernel.org \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kees@kernel.org \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.brost@intel.com \
    --cc=mhocko@suse.com \
    --cc=nao.horiguchi@gmail.com \
    --cc=npache@redhat.com \
    --cc=peterx@redhat.com \
    --cc=pfalcato@suse.de \
    --cc=rakie.kim@sk.com \
    --cc=riel@surriel.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=surenb@google.com \
    --cc=usama.arif@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    --cc=xu.xin16@zte.com.cn \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.