Sane Behaviour on Teeny Hardware
Channel: LinuxConfAu 2018 - Sydney, Australia
Date: 2018-01-26

Seb Holzapfel

http://lca2018.linux.org.au/schedule/presentation/103/

By necessity, embedded systems often use low power, cheap parts - which means that the device that flies your drone or keeps your heart beating is likely not to have a Memory Management Unit. This means that the usual protection provided by virtual memory against programming errors or untrustworthy code is absent - any task can access all memory.

Microcontroller designers recognised this problem and started to tack on a cheaper Memory Protection Unit instead. Memory partitions can be created by the programmer using the MPU to protect the kernel, real-time tasks and other data from each other - however using it effectively is not easy.

This talk will present how we implemented support for the MPU in ARM's Cortex-M series of microprocessors (a popular choice for low-power embedded designs) in eChronos, an open-source real-time operating system. It will explore how that support can be used to protect one task's data from another, the kernel from the payload tasks, and for other purposes - like sandboxing questionable third-party drivers. The implementation process was not straightforward - with many scrapped design prototypes, and traps for the unwary. Our experience represents an attempt to make the MPU usable without undue burden on the programmer using the system, and without compromising real-time properties. Other points in the design space will be discussed, along with our reasoning as to the implementation decisions we made.

A number of live hardware demonstrations (attempting to compromise MPU-less and MPU-protected systems) will be given throughout the talk.

This talk was given at Linux.conf.au 2018 (LCA2018) which was held on 22-26 January 2018 in Sydney Australia.

linux.conf.au is a conference about the Linux operating system, and all aspects of the thriving ecosystem of Free and Open Source Software that has grown up around it. Run since 1999, in a different Australian or New Zealand city each year, by a team of local volunteers, LCA invites more than 500 people to learn from the people who shape the future of Open Source. For more information on the conference see https://linux.conf.au/

#linux.conf.au #linux #foss #opensource