diff options
| author | David Hildenbrand <david@redhat.com> | 2022-11-16 11:26:44 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-30 15:58:57 -0800 |
| commit | 79881fed6052a9ce00cfb63297832b9faacf8cf3 (patch) | |
| tree | f92550ecfc810fb06a31163d848ffaaceff0f5eb /scripts/gdb/linux/utils.py | |
| parent | cdc5021cda194112bc0962d6a0e90b379968c504 (diff) | |
mm: add early FAULT_FLAG_WRITE consistency checks
Let's catch abuse of FAULT_FLAG_WRITE early, such that we don't have to
care in all other handlers and might get "surprises" if we forget to do
so.
Write faults without VM_MAYWRITE don't make any sense, and our
maybe_mkwrite() logic could have hidden such abuse for now.
Write faults without VM_WRITE on something that is not a COW mapping is
similarly broken, and e.g., do_wp_page() could end up placing an
anonymous page into a shared mapping, which would be bad.
This is a preparation for reliable R/O long-term pinning of pages in
private mappings, whereby we want to make sure that we will never break
COW in a read-only private mapping.
Link: https://lkml.kernel.org/r/20221116102659.70287-6-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions
