]> git.baikalelectronics.ru Git - kernel.git/commit
memfd: add test for COW on MAP_PRIVATE and F_SEAL_FUTURE_WRITE mappings
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Sun, 1 Dec 2019 01:53:31 +0000 (17:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Dec 2019 20:59:03 +0000 (12:59 -0800)
commit65123d96c88d0c41d3c283524a95b518198be2d1
tree1ac0953e7aff0a0c02a0dd57dcd9cfdd7f4fcce7
parent26002f72a1a9cd8df61c2c1c320386d50a2c2bfe
memfd: add test for COW on MAP_PRIVATE and F_SEAL_FUTURE_WRITE mappings

In this test, the parent and child both have writable private mappings.
The test shows that without the patch in this series, the parent and
child shared the same memory which is incorrect.  In other words, COW
needs to be triggered so any writes to child's copy stays local to the
child.

Link: http://lkml.kernel.org/r/20191107195355.80608-2-joel@joelfernandes.org
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Nicolas Geoffray <ngeoffray@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/memfd/memfd_test.c