validate_pag or validate_pag64 Kernel Service

Purpose

Validates the Process Authentication Group (PAG) value.

Syntax

#include <sys/cred.h>

int validate_pag ( type, pg, npags )
int type;
struct paglist pg[];
int npags;

int validate_pag64 ( type, pg, npags )
int type;
struct paglist64 pg[];
int npags;

Parameters

Item Description
type PAG type to validate
pg PAG list (must be in pinned memory)
npags Number of PAGs to validate

Description

The validate_pag or validate_pag64 kernel service validates the PAGs specified in pg. These services support the garbage collection of data structures by kernel extensions associated with PAGs. These structures are associated with a set_pag interface process. PAG values are inherited from parent to child across the fork system call, so one kernel extension structure can map to many processes. This routine is required to synchronize the execution of forks so that the process table can be scanned to identify a particular PAG. The validate_pag and validate_pag64 kernel services cannot be used simultaneously with the set_pag interface. The application is required to provide this synchronization.

The value of type must be a defined PAG ID. The PAG ID for the Distributed Computing Environment (DCE) is 0. The pg parameter must be a valid, referenced PAG list in pinned memory.

Execution Environment

The validate_pag and validate_pag64 kernel services can be called from the process environment only.

Return Values

A value of 0 is returned upon successful completion. Upon failure, a -1 is returned and errno is set to a value that explains the error.

Error Codes

The validate_pag and validate_pag64 kernel services fail if the following condition is true:

Item Description
EINVAL Invalid PAG specification

Related Information

Security Kernel Services in AIX® Version 7.1 Kernel Extensions and Device Support Programming Concepts.