raschk_eaddr_hkeyset Kernel Service

Purpose

Checks if an effective address can be referenced with a hardware keyset.

Syntax

#include <sys/raschk.h>
#include <sys/skeys.h>
#include <sys/kerrno.h>

kerrno_t rashchk_eaddr_hkeyset (eaddr, hset, flags)
void * eaddr;
hkeyset_t hset;
unsigned long flags;

Parameters

Item Description
eaddr Effective address to validate. Only one byte is checked.
hset Hardware keyset to validate against.
flags The following flags are defined:
RCHK_EHK_NOFAULT
No page faults are permitted while performing this check.
RCHK_EHK_NOPAGEIN
No page in is performed during this check.
RCHK_EHK_READ
Validates for read access.
RCHK_EHK_WRITE
Validates for write access.

Description

The raschk_eaddr_hkeyset kernel service performs an advisory runtime check to determine if an effective address can be referenced with a hardware keyset.

Read and write access checks are independently specified in the flags field. A check for read and write access requires both flags to be set.

Execution Environment

The raschk_eaddr_hkeyset kernel service can be called from the process or interrupt environment.

Return Values

Item Description
0 Successful.
EFAULT_RASCHK_EADDR_HKEYSET Operation failed because a page in or page fault was not allowed.
EFAULT_RASCHK_EADDR_HKEYSET_PROT The address failed the protection check.
EINVAL_RASCHK_EADDR_HKEYSET The address to validate was determined to be invalid, or neither READ nor WRITE checking was requested.