Skip to content

mm: fix for "CoW after fork()” "GUP after fork()" bug

Andrea Arcangeli requested to merge aarcange/centos-stream-9:cow-gup-fix into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1958742
Upstream Status: RHEL-only

RHEL-9 (and current upstream) MM is affected by a problem where a child process can read private memory of the parent process misusing get_user_pages(), and pinned pages, no matter if short term or FOLL_LONGTERM or FOLL_PIN or FOLL_GET, may result in silent user memory corruption.

In this downstream-only patch series we are addressing these pressing issues ahead of upstream in order to be able to ship RHEL-9 without risking user memory corruption. While the patches proposed here are an effective way of addressing the aforementioned issues, upstream is still discussing alternative approaches to cope with these issues, and unfortunately we cannot wait on their time for determination before shipping RHEL-9 free of these regressions.

For more technical details on the regressions resolved you can also refer to the below post:

https://lkml.kernel.org/r/3ae33b08-d9ef-f846-56fb-645e3b9b4c66@redhat.com

Signed-off-by: Rafael Aquini aquini@redhat.com Signed-off-by: Andrea Arcangeli aarcange@redhat.com

Edited by Andrea Arcangeli

Merge request reports