haiku/headers
Michael Lotz 75a10a74e8 kernel/vm: Make vm_copy_area take page protections into account.
When copying an area with vm_copy_area only the new protection would be
applied and any possibly existing page protections on the source area
were ignored.

For areas with stricter area protection than page protection, this lead
to faults when accessing the copy. In the opposite case it lead to too
relaxed protection. The currently only user of vm_copy_area is
fork_team which goes through all areas of the parent and copies them to
the new team. Hence page protections were ignored on all forked teams.

Remove the protection argument and instead always carry over the source
area protection and duplicate the page protections when present.

Also make sure to take the page protections into account for deciding
whether or not the copy is writable and therefore needs to have copy on
write semantics.

Change-Id: I52f295f2aaa66e31b4900b754343b3be9a19ba30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3166
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-08-23 00:55:58 +00:00
..
build Build fix. 2020-07-14 19:33:20 +02:00
compatibility headers: Add exp10 declarations to gnu/math.h. 2020-07-07 20:48:58 -04:00
config ARM64: Initial changes so we can compile GCC toolchain 2019-08-30 19:05:16 +00:00
cpp
glibc
libs agg: fix build. 2020-01-22 19:25:16 +01:00
os Revert "IK: align BTextView text rect/fix alignment" 2020-08-19 03:38:41 +00:00
posix m68k: really add fenv from musl-1.1.24 2020-08-19 15:23:47 +00:00
private kernel/vm: Make vm_copy_area take page protections into account. 2020-08-23 00:55:58 +00:00
tools