linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mm/ksm: fix ksm exec support for prctl
@ 2024-03-22  6:09 Jinjiang Tu
  2024-03-22  6:09 ` [PATCH v2 1/2] " Jinjiang Tu
  2024-03-22  6:09 ` [PATCH v2 2/2] selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec Jinjiang Tu
  0 siblings, 2 replies; 12+ messages in thread
From: Jinjiang Tu @ 2024-03-22  6:09 UTC (permalink / raw)
  To: akpm, david, shr, hannes, riel, wangkefeng.wang, sunnanyong,
	linux-mm
  Cc: tujinjiang

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. The first
patch fixes the issue.

The second patch extend the selftests of ksm to verfity the deduplication
really happens after fork/exec inherits ths KSM setting.

Changelog since v1:
  - Add ksm cleanup in __bprm_mm_init() when error occurs.
  - Add some comment.
  - Extend the selftests of ksm fork/exec.

Jinjiang Tu (2):
  mm/ksm: fix ksm exec support for prctl
  selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec

 fs/exec.c                                     | 10 +++
 include/linux/ksm.h                           | 13 +++
 .../selftests/mm/ksm_functional_tests.c       | 79 +++++++++++++++++--
 3 files changed, 96 insertions(+), 6 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-25  8:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22  6:09 [PATCH v2 0/2] mm/ksm: fix ksm exec support for prctl Jinjiang Tu
2024-03-22  6:09 ` [PATCH v2 1/2] " Jinjiang Tu
2024-03-22  9:02   ` David Hildenbrand
2024-03-25  2:24     ` Jinjiang Tu
2024-03-25  8:33       ` David Hildenbrand
2024-03-24  0:03   ` kernel test robot
2024-03-25  5:44   ` Dan Carpenter
2024-03-25  6:33     ` Jinjiang Tu
2024-03-22  6:09 ` [PATCH v2 2/2] selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec Jinjiang Tu
2024-03-22 11:43   ` David Hildenbrand
2024-03-25  2:24     ` Jinjiang Tu
2024-03-25  8:38       ` David Hildenbrand

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).