From: Jinjiang Tu <tujinjiang@huawei.com>
To: David Hildenbrand <david@redhat.com>, <akpm@linux-foundation.org>,
<shr@devkernel.io>, <hannes@cmpxchg.org>, <riel@surriel.com>,
<wangkefeng.wang@huawei.com>, <sunnanyong@huawei.com>,
<linux-mm@kvack.org>
Subject: Re: [PATCH v3] mm/ksm: fix ksm exec support for prctl
Date: Mon, 18 Mar 2024 18:54:36 +0800 [thread overview]
Message-ID: <7f5ef5da-b4b2-b49c-fb9f-1abcdd2e95da@huawei.com> (raw)
In-Reply-To: <522cd833-c09e-49d8-a79a-6811cf5f9abd@redhat.com>
在 2024/3/18 17:59, David Hildenbrand 写道:
> On 18.03.24 10:04, Jinjiang Tu wrote:
>> commit 3c6f33b7273a ("mm/ksm: support fork/exec for prctl") inherits
>> MMF_VM_MERGE_ANY flag when a task calls execve(). Howerver, it doesn't
>> create the mm_slot, so ksmd will not try to scan this task.
>>
>> To fix it, allocate and add the mm_slot to ksm_mm_head in
>> __bprm_mm_init()
>> when the mm has MMF_VM_MERGE_ANY flag.
>>
>> Fixes: 3c6f33b7273a ("mm/ksm: support fork/exec for prctl")
>> Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
>> ---
>
> Can we also please extend the KSM selftest?
> tools/testing/selftests/mm/ksm_functional_tests.c
>
> We do have test_prctl_fork_exec(), but in ksm_fork_exec_child() we
> only test if the flag is set, not if de-duplication using the ksm
> daemon actually works.
>
OK, I will try to extend the selftest.
prev parent reply other threads:[~2024-03-18 10:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 9:04 [PATCH v3] mm/ksm: fix ksm exec support for prctl Jinjiang Tu
2024-03-18 8:19 ` Jinjiang Tu
2024-03-18 9:36 ` David Hildenbrand
2024-03-18 10:52 ` Jinjiang Tu
2024-03-18 10:54 ` David Hildenbrand
2024-03-18 9:59 ` David Hildenbrand
2024-03-18 10:54 ` Jinjiang Tu [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=7f5ef5da-b4b2-b49c-fb9f-1abcdd2e95da@huawei.com \
--to=tujinjiang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=riel@surriel.com \
--cc=shr@devkernel.io \
--cc=sunnanyong@huawei.com \
--cc=wangkefeng.wang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).