raschk_eaddr_kkey Kernel Service

Purpose

Checks if an effective address can be referenced with a kernel-key.

Syntax

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

kerrno_t raschk_eaddr_kkey (eaddr, kkey, flags)
void * eaddr;
kkey_t kkey;
unsigned long flags;

Parameters

Item Description
eaddr Effective address to validate. Only one byte is checked.
kkey Kernel-key to check.
flags The following flags are defined:
RCHK_EK_NOFAULT
No page faults of any kind are permitted while performing this check.
RCHK_EK_NOPAGEIN
No page in will be performed during this check.

Description

The raschk_eaddr_kkey kernel service performs an advisory runtime check to determine if an effective address can be referenced with a kernel-key. Note that read/write attributes are not maintained at a page granularity. This service only checks if the kernel-key assigned to an effective address matches the kkey value.

Execution Environment

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

Return Values

Item Description
0 Successful.
EFAULT_RASCHK_EADDR_KKEY Operation cannot be performed because a page in or page fault was not allowed.
EINVAL_RASCHK_EADDR_KKEY The address to validate was determined to be invalid.
EINVAL_RASCHK_EADDR_KKEY_PROT The address failed the protection check.