linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Liam Howlett <liam.howlett@oracle.com>
To: Mark Brown <broonie@kernel.org>
Cc: "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2 00/44] VMA tree type safety and remove __vma_adjust()
Date: Wed, 11 Jan 2023 02:22:41 +0000	[thread overview]
Message-ID: <20230111022234.vkbei4m6jya4zxsb@revolver> (raw)
In-Reply-To: <Y73sBPPA+kaJCiZY@sirena.org.uk>

* Mark Brown <broonie@kernel.org> [230110 17:52]:
> On Thu, Jan 05, 2023 at 07:15:44PM +0000, Liam Howlett wrote:
> 
> > This patch set does two things: 1. Clean up, including removal of
> > __vma_adjust() and 2. Extends the VMA iterator API to provide type
> > safety to the VMA operations using the maple tree, as requested by Linus
> > [1].
> 
> This series *appears* to be causing some fun issues in -next for the
> past couple of days or so.  The initial failures were seen by KernelCI
> on several platforms (I've mostly been trying various arm64 things, at
> least 32 bit ARM is also affected).  The intial symptom seen is that a
> go binary called skipgen that gets invoked as part of the testing
> silently faults, tweaking things so that we get as far as running the
> arm64 selftests results in much more useful output with various things
> failing with actual error messages such as:
> 
>   ./fake_sigreturn_bad_magic: error while loading shared libraries: cannot make segment writable for relocation: Cannot allocate memory
>   ./sve-test: error while loading shared libraries: cannot make segment writable for relocation: Cannot allocate memory
> 
> I'm fairly sure we're not actually running out of memory, there's no OOM
> killer activity, the amount of memory the system has appears to make no
> difference and just replacing the kernel with a mainline build runs as
> expected.


Thanks for the detailed analysis.  This series has been dropped from
mm-unstable and, I guess, out of linux-next by tomorrow.

I will retest my series against a larger number of platforms before
sending out the next revision.

> 
> You can see the full run that produced the above errors at:
> 
>    https://lava.sirena.org.uk/scheduler/job/88257
> 
> which also embeds links to all the binaries used, exact commands run and
> so on.  The failing binaries all appear to be execed from within a
> testsuite, though it's not *all* binaries execed from within tests (eg,
> vec-syscfg execs things and seems happy).
> 
> This has taken out a bunch of testsuites in KernelCI (and probably other
> CI systems using test-definitions, though I didn't check).
> 
> I tried to bisect this but otherwise haven't made any effort to look at
> the failure.  The bisect sadly got lost in this series since a lot of
> the series either fails to build with:
> 
> /home/broonie/git/bisect/mm/madvise.c: In function 'madvise_update_vma':
> /home/broonie/git/bisect/mm/madvise.c:165:25: error: implicit declaration of function '__split_vma'; did you mean 'split_vma'? [-Werror=implicit-function-declaration]
>   165 |                 error = __split_vma(mm, vma, start, 1);
>       |                         ^~~~~~~~~~~
>       |                         split_vma

Thanks.  This was reported to me before and I had a fix in mm-unstable.
I'll squash this into the series for v3.

> 
> or fails to boot with something along the lines of:
> 
> <6>[    6.054380] Freeing initrd memory: 86880K
> <1>[    6.087945] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078
> <1>[    6.088231] Mem abort info:
> <1>[    6.088340]   ESR = 0x0000000096000004
> <1>[    6.088504]   EC = 0x25: DABT (current EL), IL = 32 bits
> <1>[    6.088671]   SET = 0, FnV = 0
> <1>[    6.088802]   EA = 0, S1PTW = 0
> <1>[    6.088929]   FSC = 0x04: level 0 translation fault
> <1>[    6.089099] Data abort info:
> <1>[    6.089210]   ISV = 0, ISS = 0x00000004
> <1>[    6.089347]   CM = 0, WnR = 0
> <1>[    6.089486] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000043e33000
> <1>[    6.089692] [0000000000000078] pgd=0000000000000000, p4d=0000000000000000
> <0>[    6.090566] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
> <4>[    6.090866] Modules linked in:
> <4>[    6.091167] CPU: 0 PID: 42 Comm: modprobe Not tainted 6.2.0-rc1-00190-g505c59767243 #13
> <4>[    6.091478] Hardware name: linux,dummy-virt (DT)
> <4>[    6.091784] pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
> <4>[    6.092048] pc : mas_wr_walk+0x60/0x2d0
> <4>[    6.092622] lr : mas_wr_store_entry.isra.0+0x80/0x4a0
> <4>[    6.092798] sp : ffff80000821bb10
> <4>[    6.092926] x29: ffff80000821bb10 x28: ffff000003fa4480 x27: 0000000200100073
> <4>[    6.093206] x26: ffff000003fa41b0 x25: ffff000003fa43f0 x24: 0000000000000002
> <4>[    6.093445] x23: 0000000ffffae021 x22: 0000000000000000 x21: ffff000002a74440
> <4>[    6.093685] x20: ffff000003fa4480 x19: ffff80000821bc48 x18: 0000000000000000
> <4>[    6.093933] x17: 0000000000000000 x16: ffff000002b8da00 x15: ffff80000821bc48
> <4>[    6.094169] x14: 0000ffffae022fff x13: ffffffffffffffff x12: ffff000002b8da0c
> <4>[    6.094427] x11: ffff80000821bb68 x10: ffffd75265462458 x9 : ffff80000821bc48
> <4>[    6.094685] x8 : ffff80000821bbb8 x7 : ffff80000821bc48 x6 : ffffffffffffffff
> <4>[    6.094922] x5 : 000000000000000e x4 : 000000000000000e x3 : 0000000000000000
> <4>[    6.095167] x2 : 0000000000000008 x1 : 000000000000000f x0 : ffff80000821bb68
> <4>[    6.095499] Call trace:
> <4>[    6.095685]  mas_wr_walk+0x60/0x2d0
> <4>[    6.095936]  mas_store_prealloc+0x50/0xa0
> <4>[    6.096097]  mmap_region+0x520/0x784
> <4>[    6.096232]  do_mmap+0x3b0/0x52c
> <4>[    6.096347]  vm_mmap_pgoff+0xe4/0x10c
> <4>[    6.096480]  ksys_mmap_pgoff+0x4c/0x204
> <4>[    6.096621]  __arm64_sys_mmap+0x30/0x44
> <4>[    6.096754]  invoke_syscall+0x48/0x114
> <4>[    6.096900]  el0_svc_common.constprop.0+0x44/0xec
> <4>[    6.097052]  do_el0_svc+0x38/0xb0
> <4>[    6.097183]  el0_svc+0x2c/0x84
> <4>[    6.097287]  el0t_64_sync_handler+0xf4/0x120
> <4>[    6.097457]  el0t_64_sync+0x190/0x194
> <0>[    6.097835] Code: 39402021 51000425 92401ca4 12001ca5 (f8647844) 
> <4>[    6.098294] ---[ end trace 0000000000000000 ]---
> 
> (not always exactly the same backtrace, but the mas_wr_walk() was always
> there.)

Thanks.  This was also reported and a fix had landed in mm-unstable as
well.

> 
> The specific set of commits in next-20230110 where bisect got lost was:
> 
> 505c59767243 madvise: use vmi iterator for __split_vma() and vma_merge()
> 1cfdd2a44d6b mmap: pass through vmi iterator to __split_vma()
> 7d718fd9873c sched: convert to vma iterator
> 2f94851ec717 mmap: use vmi version of vma_merge()
> 7e2dd18353a3 task_mmu: convert to vma iterator
> 756841b468f5 mm/mremap: use vmi version of vma_merge()
> aaba4ba837fa mempolicy: convert to vma iterator
> 8193673ee5d8 coredump: convert to vma iterator
> d4f7ebf41a44 mm: switch vma_merge(), split_vma(), and __split_vma to vma iterator
> 4b02758dc3c5 mlock: convert mlock to vma iterator
> fd367dac089e include/linux/mm: declare different type of split_vma() for !CONFIG_MMU
> 3a72a0174748 mm/damon: stop using vma_mas_store() for maple tree store
> dd51a3ca1096 mm: change mprotect_fixup to vma iterator
> b9e4eabb8f40 mmap: convert __vma_adjust() to use vma iterator
> c6fc05242a09 userfaultfd: use vma iterator
> b9000fd4c5a6 mmap-convert-__vma_adjust-to-use-vma-iterator-fix
> bdfb333b0b2a ipc/shm: use the vma iterator for munmap calls
> 3128296746a1 mm: pass through vma iterator to __vma_adjust()
> 80c8eed1721e mm: add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma()
> 311129a7971c mmap: convert vma_expand() to use vma iterator
> 69e9b6c8a525 madvise: use split_vma() instead of __split_vma()
> 751f0a6713a9 mm: remove unnecessary write to vma iterator in __vma_adjust()
> a7f83eb601ef mmap: change do_mas_munmap and do_mas_aligned_munmap() to use vma iterator
> 39fd6622223e mm: pass vma iterator through to __vma_adjust()
> 

...

I appreciate you running through the bisect and bringing this to my
attention.

I will do a better job of emailing linux-next the fixes, which I
obviously overlooked.

      reply	other threads:[~2023-01-11  2:22 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 19:15 Liam Howlett
2023-01-05 19:15 ` [PATCH v2 02/44] maple_tree: Fix potential rcu issue Liam Howlett
2023-01-05 19:15 ` [PATCH v2 01/44] maple_tree: Add mas_init() function Liam Howlett
2023-01-05 19:15 ` [PATCH v2 04/44] test_maple_tree: Test modifications while iterating Liam Howlett
2023-01-05 19:15 ` [PATCH v2 05/44] mm: Expand vma iterator interface Liam Howlett
2023-01-05 19:15 ` [PATCH v2 03/44] maple_tree: Reduce user error potential Liam Howlett
2023-01-05 19:15 ` [PATCH v2 08/44] mmap: Convert vma_link() vma iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 07/44] kernel/fork: Convert forking to using the vmi iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 06/44] mm/mmap: convert brk to use vma iterator Liam Howlett
2023-01-09 15:10   ` Vernon Yang
2023-01-09 16:38     ` Liam Howlett
2023-01-05 19:15 ` [PATCH v2 10/44] mmap: Change do_mas_munmap and do_mas_aligned_munmap() " Liam Howlett
2023-01-10 14:53   ` Sven Schnelle
2023-01-10 17:26     ` Liam Howlett
2023-01-11  6:55       ` Sven Schnelle
2023-01-05 19:15 ` [PATCH v2 11/44] mmap: Convert vma_expand() " Liam Howlett
2023-01-05 19:15 ` [PATCH v2 09/44] mm/mmap: Remove preallocation from do_mas_align_munmap() Liam Howlett
2023-01-05 19:15 ` [PATCH v2 14/44] userfaultfd: Use vma iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 13/44] ipc/shm: Use the vma iterator for munmap calls Liam Howlett
2023-01-05 19:15 ` [PATCH v2 15/44] mm: Change mprotect_fixup to vma iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 12/44] mm: Add temporary vma iterator versions of vma_merge(), split_vma(), and __split_vma() Liam Howlett
2023-01-05 19:15 ` [PATCH v2 18/44] mempolicy: Convert to vma iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 17/44] coredump: " Liam Howlett
2023-01-05 19:15 ` [PATCH v2 16/44] mlock: Convert mlock " Liam Howlett
2023-01-05 19:15 ` [PATCH v2 20/44] sched: Convert " Liam Howlett
2023-01-05 19:15 ` [PATCH v2 22/44] mmap: Pass through vmi iterator to __split_vma() Liam Howlett
2023-01-07  2:01   ` SeongJae Park
2023-01-07  2:39     ` SeongJae Park
2023-01-09 16:45       ` Liam Howlett
2023-01-09 19:28         ` SeongJae Park
2023-01-09 20:30           ` Liam Howlett
2023-01-09 23:07             ` SeongJae Park
2023-01-05 19:15 ` [PATCH v2 21/44] madvise: Use vmi iterator for __split_vma() and vma_merge() Liam Howlett
2023-01-05 19:15 ` [PATCH v2 19/44] task_mmu: Convert to vma iterator Liam Howlett
2023-01-05 19:15 ` [PATCH v2 23/44] mmap: Use vmi version of vma_merge() Liam Howlett
2023-01-05 19:15 ` [PATCH v2 24/44] mm/mremap: " Liam Howlett
2023-01-05 19:15 ` [PATCH v2 25/44] mm: Switch vma_merge(), split_vma(), and __split_vma to vma iterator Liam Howlett
2023-01-06 17:23   ` SeongJae Park
2023-01-06 19:20     ` Liam Howlett
2023-01-05 19:16 ` [PATCH v2 27/44] mmap: Convert __vma_adjust() to use " Liam Howlett
2023-01-05 19:16 ` [PATCH v2 26/44] mm/damon: Stop using vma_mas_store() for maple tree store Liam Howlett
2023-01-05 19:32   ` SeongJae Park
2023-01-05 19:52     ` Liam Howlett
2023-01-05 20:16       ` SeongJae Park
2023-01-05 19:16 ` [PATCH v2 28/44] mm: Pass through vma iterator to __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 30/44] mm: Remove unnecessary write to vma iterator in __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 29/44] madvise: Use split_vma() instead of __split_vma() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 33/44] mmap: Clean up mmap_region() unrolling Liam Howlett
2023-01-05 19:16 ` [PATCH v2 32/44] mm: Add vma iterator to vma_adjust() arguments Liam Howlett
2023-01-05 19:16 ` [PATCH v2 31/44] mm: Pass vma iterator through to __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 34/44] mm: Change munmap splitting order and move_vma() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 37/44] mm/mmap: Use vma_prepare() and vma_complete() in vma_expand() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 35/44] mm/mmap: move anon_vma setting in __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 36/44] mm/mmap: Refactor locking out of __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 38/44] mm/mmap: Introduce init_vma_prep() and init_multi_vma_prep() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 39/44] mm: Don't use __vma_adjust() in __split_vma() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 40/44] mm/mmap: Don't use __vma_adjust() in shift_arg_pages() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 42/44] mm/mmap: Convert do_brk_flags() to use vma_prepare() and vma_complete() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 43/44] mm/mmap: Remove __vma_adjust() Liam Howlett
2023-01-05 19:16 ` [PATCH v2 44/44] vma_merge: Set vma iterator to correct position Liam Howlett
2023-01-05 19:16 ` [PATCH v2 41/44] mm/mmap: Introduce dup_vma_anon() helper Liam Howlett
2023-01-10 22:51 ` [PATCH v2 00/44] VMA tree type safety and remove __vma_adjust() Mark Brown
2023-01-11  2:22   ` Liam Howlett [this message]

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=20230111022234.vkbei4m6jya4zxsb@revolver \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox