KasperskyOS Community Edition 1.3

libkos library

The libkos library is the basic KasperskyOS library that provides the set of APIs that allow programs and other libraries (for example, libc and kdf) to use core endpoints. The APIs provided by the libkos library enable solution developers to do the following:

  • Manage processes, threads, and virtual memory.
  • Control access to resources.
  • Perform input/output operations.
  • Create IPC channels.
  • Manage power.
  • Obtain statistical data on the system.
  • Use other capabilities supported by core endpoints.

On hardware platforms running an Arm processor architecture, input and output parameters of the libkos library API cannot be saved in "Device memory" because this could lead to unpredictable behavior. (Exceptions to this rule are the addr parameter of the KnVmQuery() function from the vmm_api.h API, the reg and baseReg parameters of functions from the mmio.h API, the va parameter of the KnHalFlushCache() function from the hal_api.h API, and the va parameter of the KosCpuCacheFlush() function from the cpucache.h API.) Parameters of the libkos library API must be saved in "Normal memory". To copy data from "Device memory" to "Normal memory" and vice versa, you must use the RtlPedanticMemcpy() function declared in the header file sysroot-*-kos/include/rtl/string_pedantic.h from the KasperskyOS SDK.

In this section

Managing handles (handle_api.h)

Managing virtual memory (vmm_api.h)

Allocating and freeing memory (alloc.h)

Using DMA (dma.h)

Memory-mapped I/O (mmio.h)

Managing interrupt processing (irq.h)

Managing threads (high-level API thread.h)

Managing threads (low-level API thread_api.h)

Managing processes (high-level API task.h)

Managing processes (low-level API task_api.h)

Initializing IPC transport for interprocess communication and managing IPC request processing (transport-kos.h, transport-kos-dispatch.h)

Initializing IPC transport for querying the security module (transport-kos-security.h)

Generating random numbers (random_api.h)

Getting and changing time values (time_api.h)

Using notifications (notice_api.h)

Dynamically creating IPC channels (cm_api.h, ns_api.h)

Using synchronization primitives (event.h, mutex.h, rwlock.h, semaphore.h, condvar.h)

Managing I/O memory isolation (iommu_api.h)

Using queues (queue.h)

Using memory barriers (barriers.h)

Executing system calls (syscalls.h)

IPC interrupt (ipc_api.h)

Using sessions (session.h)

Using KosObjects (objects.h)

Using KosObject containers (objcontainer.h)

Using KosStrings (strings.h)

KasperskyOS kernel XHCI DbC driver management (xhcidbg_api.h)

Receiving security audit data (vlog_api.h)

Using futexes (sync.h)

Getting IPC handles and RIIDs to use statically created IPC channels (sl_api.h)

Power management (pm_api.h)