Re: [PATCH v4] mm: per-thread vma caching

From: Davidlohr Bueso
Date: Tue Mar 04 2014 - 00:32:46 EST


On Mon, 2014-03-03 at 19:26 -0800, Linus Torvalds wrote:
> On Mon, Mar 3, 2014 at 7:13 PM, Davidlohr Bueso <davidlohr@xxxxxx> wrote:
> >
> > Yes, I shortly realized that was silly... but I can say for sure it can
> > happen and a quick qemu run confirms it. So I see your point as to
> > asking why we need it, so now I'm looking for an explanation in the
> > code.
>
> We definitely *do* have users.
>
> One example would be ptrace -> access_process_vm -> __access_remote_vm
> -> get_user_pages() -> find_extend_vma() -> find_vma_prev -> find_vma.

And:

[ 4.274542] Call Trace:
[ 4.274747] [<ffffffff81809525>] dump_stack+0x46/0x58
[ 4.275069] [<ffffffff811331ee>] vmacache_find+0xae/0xc0
[ 4.275425] [<ffffffff8113c840>] find_vma+0x20/0x80
[ 4.275625] [<ffffffff8113e5cb>] find_extend_vma+0x2b/0x90
[ 4.275982] [<ffffffff81138a09>] __get_user_pages+0x99/0x5a0
[ 4.276427] [<ffffffff81137b0b>] ? follow_page_mask+0x32b/0x400
[ 4.276671] [<ffffffff81138fc2>] get_user_pages+0x52/0x60
[ 4.276886] [<ffffffff81167dc3>] copy_strings.isra.20+0x1a3/0x2f0
[ 4.277239] [<ffffffff81167f4d>] copy_strings_kernel+0x3d/0x50
[ 4.277472] [<ffffffff811b3688>] load_script+0x1e8/0x280
[ 4.277692] [<ffffffff81167d0a>] ? copy_strings.isra.20+0xea/0x2f0
[ 4.277931] [<ffffffff81167ff7>] search_binary_handler+0x97/0x1d0
[ 4.278288] [<ffffffff811694bf>] do_execve_common.isra.28+0x4ef/0x650
[ 4.278544] [<ffffffff81169638>] do_execve+0x18/0x20
[ 4.278754] [<ffffffff8116984e>] SyS_execve+0x2e/0x40
[ 4.278960] [<ffffffff8181b549>] stub_execve+0x69/0xa0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/