From: Stefan Roesch <shr@devkernel.io>
To: kernel-team@fb.com
Cc: shr@devkernel.io, akpm@linux-foundation.org, david@redhat.com,
hannes@cmpxchg.org, riel@surriel.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH v1 0/2] mm/ksm: add fork-exec support for prctl
Date: Tue, 19 Sep 2023 13:51:56 -0700 [thread overview]
Message-ID: <20230919205158.1897353-1-shr@devkernel.io> (raw)
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
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 ++-
tools/testing/selftests/mm/Makefile | 2 +
.../selftests/mm/ksm_fork_exec_child.c | 9 ++++
.../selftests/mm/ksm_functional_tests.c | 50 ++++++++++++++++++-
4 files changed, 65 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/mm/ksm_fork_exec_child.c
base-commit: 15bcc9730fcd7526a3b92eff105d6701767a53bb
--
2.39.3
next reply other threads:[~2023-09-19 20:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 20:51 Stefan Roesch [this message]
2023-09-19 20:51 ` [PATCH v1 1/2] mm/ksm: support fork/exec for prctl Stefan Roesch
2023-09-20 10:00 ` Carl Klemm
2023-09-20 13:11 ` David Hildenbrand
2023-09-20 16:29 ` Stefan Roesch
2023-09-19 20:51 ` [PATCH v1 2/2] mm/ksm: Test case for prctl fork/exec workflow Stefan Roesch
2023-09-20 13:16 ` David Hildenbrand
2023-09-20 18:57 ` Stefan Roesch
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=20230919205158.1897353-1-shr@devkernel.io \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@surriel.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).