kernel/vm: restrict permission changes on shared file-mapped areas
a protection_max attribute is added in VMArea. a read-only opened file already can't be mapped shared read-write at the moment, but can later be changed to read-write with mprotect() or set_area_protection(). When creating the VMArea, the actual maximum protection is stored in the area, so that it can be checked when needed. this fixes a VM TODO. Change-Id: I33b144c192034eeb059f1dede5dbef5af947280d Reviewed-on: https://review.haiku-os.org/c/haiku/+/3804 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
99806fe3d6
commit
45872f7f9c
@@ -100,6 +100,7 @@ public:
|
||||
area_id id;
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
uint32 protection;
|
||||
uint32 protection_max;
|
||||
uint16 wiring;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user