All Projects → wookey-project → ewok-kernel

wookey-project / ewok-kernel

Licence: Apache-2.0 license
A secure and high performances microkernel for building secure MCU-based IoTs

Programming Languages

Ada
118 projects
perl
6916 projects
c
50402 projects - #5 most used programming language
assembly
5116 projects
python
139335 projects - #7 most used programming language
Smarty
1635 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ewok-kernel

m3forth
m3forth is a forth cross-compiler for cortex-m3 ARM microcontrollers
Stars: ✭ 16 (-76.81%)
Mutual labels:  arm, microcontroller, armv7m
Daplink
Stars: ✭ 1,162 (+1584.06%)
Mutual labels:  arm, microcontroller, embedded
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+7927.54%)
Mutual labels:  arm, microcontroller, embedded
mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (-75.36%)
Mutual labels:  arm, microcontroller, embedded
Tock
A secure embedded operating system for microcontrollers
Stars: ✭ 3,258 (+4621.74%)
Mutual labels:  arm, microcontroller, embedded
Distortos
object-oriented C++ RTOS for microcontrollers
Stars: ✭ 354 (+413.04%)
Mutual labels:  arm, microcontroller, embedded
Pyocd
Open source Python library for programming and debugging Arm Cortex-M microcontrollers
Stars: ✭ 550 (+697.1%)
Mutual labels:  arm, microcontroller, embedded
Bitbox
The bitbox console (example, firmwares, doc)
Stars: ✭ 78 (+13.04%)
Mutual labels:  arm, embedded
Ehal
Embedded Hardware Abstraction Library
Stars: ✭ 84 (+21.74%)
Mutual labels:  arm, embedded
ersatz80
Z80+ARM=BUGS
Stars: ✭ 13 (-81.16%)
Mutual labels:  arm, microcontroller
Xpcc
DEPRECATED, use our successor library https://modm.io instead
Stars: ✭ 177 (+156.52%)
Mutual labels:  arm, microcontroller
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+13042.03%)
Mutual labels:  arm, microcontroller
Cargo Flash
a cargo extension for programming microcontrollers
Stars: ✭ 134 (+94.2%)
Mutual labels:  arm, embedded
Frosted
Frosted: Free POSIX OS for tiny embedded devices
Stars: ✭ 194 (+181.16%)
Mutual labels:  arm, embedded
Stm32l4xx Hal
A Hardware abstraction layer for the stm32l432xx series chips written in rust.
Stars: ✭ 65 (-5.8%)
Mutual labels:  arm, embedded
Cargo Embed
a cargo extension for working with microcontrollers
Stars: ✭ 100 (+44.93%)
Mutual labels:  arm, embedded
Mylinux
myLinux is a small UNIX like OS for embedded systems based on Westermo NetBox
Stars: ✭ 53 (-23.19%)
Mutual labels:  arm, embedded
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (+150.72%)
Mutual labels:  arm, microcontroller
stm32f103xx
DEPRECATED
Stars: ✭ 31 (-55.07%)
Mutual labels:  arm, microcontroller
Talks
schedule and materials about my presentations
Stars: ✭ 245 (+255.07%)
Mutual labels:  arm, microcontroller

EwoK, a secure microkernel for building secure embedded systems

Release Build Status

What is EwoK ?

EwoK is a highly secure microkernel targeting micro-controllers and embedded systems. It aims to bring an efficient hardening of embedded devices with a reduced impact on the device performances.

EwoK has been designed to host complex drivers in userspace. Unlike most of other microkernels, the goal is to support complex software stacks (ISO7816,...) as well as high performance (USB, SDIO, CRYP) drivers. This makes EwoK valuable for multiple use cases, including high speed and security targeted devices. Security properties

EwoK is a microkernel enforcing strict isolation between tasks and device drivers and providing strict access control to physical resources (devices, etc.) and strong enforcement of the least privilege principle.

EwoK is also implemented in Ada/SPARK, a strongly typed language often used in highly critical domains (avionic, railway systems, space, etc.) to build safe and secure software.

Some other security features provided by EwoK:

  • Strict memory partitioning
  • Strict partitioning of physical resources (devices, etc.)
  • Fixed permissions management, set at compile time and easily verifiable
  • Stack smashing protection
  • Heap/Stack smashing protection
  • Proved W^X memory mappings
  • Strict temporal separation between declarative phase and execution phase

Ewok provides to the userspace drivers a specific interface to allow them to use the DMA engines. It permits to achieve high performance, specifically with high speed buses.

Nevertheless, DMA registers are never directly accessible to user tasks and any DMA configuration implies a validation of all the inputs by the kernel before any modification of the controller is pushed at the hardware level.

EwoK architecture

The Ewok kernel is divided into two main components: the libbsp and the kernel part.

The libbsp is the architecture-specific part of the kernel, hosting all the low level and arch-specific drivers (MPU, GPIOs, timers, DMAs, etc.). The libbsp is itself separated in:

  • SoC-specific drivers, such as DMA or GPIO support for the STM32F407, STM32F429 and STM32F439 SoCs
  • Core-specific drivers, such as MPU support for the Cortex-M4 ARMv7-m micro-architecture

The kernel part contains all specific high level content (scheduling, task management, syscalls, etc.) and uses the libbsp as a hardware abstraction for any low-level interaction.

About the chosen programming languages

C is a language highly understood by most of the developers community. Therefore, most of microkernels have been written in C and assembly. However, because of our experience in security, we are convinced that C is too error-prone. Its loose typing, its unsafe bitfields management, too many compiler dependent behaviors, etc. easily lead to vulnerabilities.

An easy alternative is to use a language that enforces strong typing and that prevent "classical" vulnerabilities (buffer overflows, dangling pointers, etc.). However, we found that very few languages enforce strong typing while being suitable for bare metal programming. We choosed to gave a try to Ada/SPARK. That language exceeded our expectations, by being simple to use and by gaving us a tremendous help in the debugging process.

Therefore, EwoK is almost entirely implemented in Ada/SPARK (with a little bit of assembly).

EwoK API

The whole microkernel architecture and the API provided to the user tasks are specifically designed for helping developpers to implement highly secure and performant drivers.

Note that despite being a microkernel, Ewok is not full-IPC driven like L4 family microkernels. Beyond this, and similarly to other kernels, EwoK interactions with the userspace are based on syscalls. In the particular case of EwoK, a main application has two execution contexts: standard thread mode and ISR thread mode. Some syscalls can be executed from any context while others cannot. This property is described in each syscall documentation, and the developer will have to refer to it and understand in which context a piece of code is executed before calling such a syscall.

EwoK permission model

EwoK permission model is static. Permissions are set at configuration time, before building the firmware, and can't be updated during the device life cycle. Each application permissions are stored in a .rodata part of the kernel, reducing the risk of any invalid modification.

As EwoK is a driver-oriented microkernel, permissions are also driver oriented.

For more information about the EwoK microkernel, the complete documentation is published here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].