linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm/ksm: add fork-exec support for prctl
@ 2023-09-21 16:47 Stefan Roesch
  2023-09-21 16:47 ` [PATCH v3 1/2] mm/ksm: support fork/exec " Stefan Roesch
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stefan Roesch @ 2023-09-21 16:47 UTC (permalink / raw)
  To: kernel-team; +Cc: shr, akpm, david, hannes, riel, linux-kernel, linux-mm

A process can enable KSM with the prctl system call. When the process is
forked the KSM flag is inherited by the child process. However if the
process is executing an exec system call directly after the fork, the
KSM setting is cleared. This patch series addresses this problem.

1) Change the mask in coredump.h for execing a new process
2) Add a new test case in ksm_functional_tests


Changes:
- V3:
  - Combined two lines in function ksm_fork_exec_child()

- V2:
  - Removed the child program from the patch series
  - Child program is implemented by the program itself
  - Added a new command line parameter for the child program
  - Removed new section from Makefile
  - Removed duplicate ; charaters
  - Added return in if clause
  - Used PR_GET_MEMORY_MERGE instead of magic numbers
  - Resetting PR_SET_MEMROY_MERGE at the end.


Stefan Roesch (2):
  mm/ksm: support fork/exec for prctl
  mm/ksm: Test case for prctl fork/exec workflow

 include/linux/sched/coredump.h                |  7 +-
 .../selftests/mm/ksm_functional_tests.c       | 66 ++++++++++++++++++-
 2 files changed, 70 insertions(+), 3 deletions(-)


base-commit: 15bcc9730fcd7526a3b92eff105d6701767a53bb
-- 
2.39.3



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

end of thread, other threads:[~2023-09-22 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-21 16:47 [PATCH v3 0/2] mm/ksm: add fork-exec support for prctl Stefan Roesch
2023-09-21 16:47 ` [PATCH v3 1/2] mm/ksm: support fork/exec " Stefan Roesch
2023-09-21 16:47 ` [PATCH v3 2/2] mm/ksm: Test case for prctl fork/exec workflow Stefan Roesch
2023-09-22  0:32 ` [PATCH v3 0/2] mm/ksm: add fork-exec support for prctl Andrew Morton
2023-09-22 16:08   ` Stefan Roesch

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