Close

Basics

A project log for POSEVEN

A programming model for languages and "application processors", that emphasises speed, safety, security and modularity.

yann-guidon-ygdesYann Guidon / YGDES 07/11/2024 at 00:410 Comments

POSEVEN is based on a platform (with a proper mix of hardware and software features) that provides/implements the following two fundamental elements :

1. Threads

A thread is a stream of execution : a sequence of instructions that are fetched, decoded and operated upon, one after the other, with the eventual and conditional change in the sequence that is controlled by the program and/or external data.

Nothing new here.

A POSEVEN system may implement an arbitrary number of threads, which may be limited by hardware constraints.

A thread can be started, paused, resumed, interrupted, frozen, thawed, swapped in/out or terminated at any time.

A POSEVEN thread has a "global" context that contains

A thread executes code from one module at a time.

2. Modules

A POSEVEN system hosts a number of modules: they contain an area of code to execute, associated with a common data memory area.

The code is a static collection of instructions to be executed by a thread. The thread can switch from one module to another by "calling" entry points in the desired module's trampoline area, located in the first instructions of the module.

The common data area is accessed only by the threads that execute the code of the associated module. Since any number of threads can execute a module simultaneously, all the code must be reentrant, and the relevant variables must be protected by semaphores, spinlocks or Mutexes.

.

Threat model

POSEVEN imposes modularity to promote code reuse and contain/isolate the flaws. The POSEVEN system assumes that any thread or module could be "rogue". It is the implementer's job to ensure that the "kernel" module (#0) and the "kernel" thread (ThId#0) provide the appropriate "root of trust".

Any module can call, or be called by, a module that is potentially altered (accidentally or intentionally) so a strict separation of the modules and threads is further required.

Communication between modules and/or threads uses strict safe interfaces:

POSEVEN can not prevent hardware alteration or physical bypass of access rights/tokens. However it is designed to prevent, detect and isolate "unwanted" behaviour without getting too much in the way of an application, which is free to define its own policy. Adherence to security and safety rules is the responsibility of the system designer and implementation, but the system is considered unsafe unless proved otherwise.

Discussions