Skip to content

mm/ksm: add fork-exec support for prctl

Stefan Roesch linux-mm lkml 4 versions – Applied

Status from this message: [merged mm-stable] mm-ksm-test-case-for-prctl-fork-exec-workflow.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesApplied 2/2
  2. v32 patches 2 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches5 repliesSuperseded

Changes from the cover letter

- V4:
- Added motivation for the fix to the commit message of the first patch
- 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.

Patches in v4 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm/ksm: support fork/exec for prctlinclude/linux/sched/coredump.h+5 -20 repliesApplied
2/2mm/ksm: Test case for prctl fork/exec workflowtools/testing/selftests/mm/ksm_functional_tests.c+65 -10 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid HildenbrandCarl Klemm
1/2R-b T-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] mm/ksm: add fork-exec support for prctl

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:
- V4:
- Added motivation for the fix to the commit message of the first patch
- 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

Signature · 1 line
2.39.3