linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] mm/ksm: fix ksm exec support for prctl
@ 2024-03-27  6:09 Jinjiang Tu
  2024-03-27  6:09 ` [PATCH v3 1/3] " Jinjiang Tu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jinjiang Tu @ 2024-03-27  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(). However, 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 refactors to prepare for the third patch. The third patch
extends the selftests of ksm to verfity the deduplication really happens
after fork/exec inherits ths KSM setting.

Changelog since v2:
  - fix uninitialized warning reported by kernel test robot.
  - refactor selftests.

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 (3):
  mm/ksm: fix ksm exec support for prctl
  selftest/mm: ksm_functional_tests: refactor mmap_and_merge_range()
  selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec

 fs/exec.c                                     |  11 ++
 include/linux/ksm.h                           |  13 ++
 .../selftests/mm/ksm_functional_tests.c       | 145 +++++++++++++-----
 3 files changed, 133 insertions(+), 36 deletions(-)

-- 
2.25.1



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

end of thread, other threads:[~2024-03-27 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27  6:09 [PATCH v3 0/3] mm/ksm: fix ksm exec support for prctl Jinjiang Tu
2024-03-27  6:09 ` [PATCH v3 1/3] " Jinjiang Tu
2024-03-27  9:15   ` David Hildenbrand
2024-03-27  6:09 ` [PATCH v3 2/3] selftest/mm: ksm_functional_tests: refactor mmap_and_merge_range() Jinjiang Tu
2024-03-27 11:31   ` David Hildenbrand
2024-03-27  6:09 ` [PATCH v3 3/3] selftest/mm: ksm_functional_tests: extend test case for ksm fork/exec Jinjiang Tu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox