next up previous contents
Next: 4.10 fluke_region_reference: associates a Up: 4 Regions Previous: 4.8 fluke_region_move: move a

4.9 fluke_region_protect: change the access permissions of a memory region

SYNOPSIS

void fluke_region_protect(fluke_region_t *region, fluke_prot_t max_prot);

DESCRIPTION

This operation modifies the maximum access allowed to a memory region. The new permission affects any mappings inheriting either directly or indirectly from the region. A protection value of FLUKE_PROT_NONE can be used to flush all cached address translations for the affected memory, causing faults for any subsequent accesses to that memory.

fluke_region_protect can be used to either restrict or relax the protection value.

Note that this function is semantically equivalent to doing fluke_region_get_state, changing the protection field of the state and then calling fluke_region_set_state.

PARAMETERS

region
The region to be changed.
max_prot
The maximum permissions to be left in any mappings derived from this region.

ERRORS

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
NO_OBJECT
region does not point to an active object.
NOT_REGION
The object pointed to by region is not a region object.
INVALID_OBJECT
The state of the region object has become invalid.
INVALID_PROT
The requested protection, max_prot, was invalid.

RELATED INFORMATION

fluke_region_get_state, fluke_region_set_state



Utah Flux Research Group