Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Modules | Functions
SVM access control

This module contains API functions to handle SVM access control. More...

## Modules
| SVM access control instructions
| This module contains API functions to handle SVM access control instructions limit.
| SVM access control memory
| This module contains API functions to handle SVM access control memory limit.

## Functions
SVM_FUNCTION SVM_AccessControl | svm_accesscontrol_new (const void *svm, const unsigned long int *max_instructions, const unsigned long int *max_memory)
| This function creates an access control quota for a SVM code execution.

## Detailed Description

This module contains API functions to handle SVM access control.

Access control represents processor and memory quotas used to avoid spurious code execution.

These quotas are defined at kernel level and are used only in protected mode.

Once a quota is set, the processor and the memory usage is monitored and checked against the quota. When a usage overflow attempt is detected, a SECURITY interruption is raised.

See also
  SVM kernels

## Function Documentation

## ◆ svm_accesscontrol_new()

SVM_FUNCTION SVM_AccessControl svm_accesscontrol_new | ( | const void * | svm,
|  | const unsigned long int * | max_instructions,
|  | const unsigned long int * | max_memory
| ) |  |

This function creates an access control quota for a SVM code execution.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | max_instructions | The maximum instructions that can be executed. A NULL pointer means no limit.
  [in] | max_memory | The maximum memory that can be allocated. A NULL pointer means no limit.

Returns
  An access control with some execution limits.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)