Connected Cars: In control

The next generation of autonomous vehicles will require powerful vehicle domain controllers

Chris Barlow from Lynx Software technologies describes a practical platform for safe and secure self-driving cars

In the automotive industry, cost is a dominant factor in vehicle system design, which makes it challenging to introduce the advanced technologies such as lidar, computer vision and machine learning that self-driving cars demand, at a price the market will accept.

These highly complex systems require a shift from microcontrollers to more expensive multicore microprocessors and graphics processors, so it is desirable to reduce costs by hosting what would traditionally be physically distributed systems on fewer, consolidated devices called vehicle domain controllers.

A key requirement for these domain controllers is to maintain the safety characteristics of traditional physically distributed systems while enhancing security. All functionality cannot be simply combined into one monolithic software environment, though. Doing so would expose all software to any wireless attack surfaces in the design, as well as impacting the timing behaviour of the safety critical components. A more sensible answer is to use a hypervisor to host multiple virtual machines on one processor. This provides the desired cost and weight savings, as well as the ability to apply strict controls to the communications between sub-systems.

Ideally, the hypervisor will allow software components written for microcontrollers to be easily ported to their own virtual machines, and run alongside more complex operating systems. The hypervisor should be lightweight, such that it does not interfere with safety-critical timing behaviour, while providing freedom from interference between guests.

 

Security and safety

Although automotive security and functional safety go hand-in-hand they often require different design approaches. ISO 26262 is a design methodology where functional safety hazards are analysed and scored according to quantifiable factors; severity, controllability and exposure. All expected failures can be mitigated against, and it can be proven that the chosen strategies address a specific hazard.

In cyber security, the challenge is slightly different. The risks today are known, however new vulnerabilities are discovered all the time so machines exposed to wireless networks must be considered untrusted. In connected autonomous cars, wireless signals from other cars need to be accommodated and even street furniture in the case of vehicle to infrastructure communications.

A malicious wireless signal might be valid (traffic lights ahead are green), but might be hazardous in a certain context (lights are actually red). To protect such a system, the safety-critical software needs to be isolated from untrusted environments, and tight control is needed of all communications such that functional safety cases can be designed around the detection of valid but unauthorised signals.

 

Locking down

Traditional automotive systems comprise separate boxes that communicate using serial communications, typically on the Can bus. To keep costs and weight down, Can was designed to use a bus topology where all broadcast messages are visible to every node on a network. It is then up to the nodes to decide if they need a given message.

This has a fundamental vulnerability that was demonstrated by Charlie Miller and Chris Valasek’s remote Jeep hack in 2015.

Anyone can read or transmit messages on a Can bus and, critically, it is very difficult for the receiving nodes to know where the messages came from. A topology where each node has a private point-to-point connection with those it needs to talk to would be more secure, however the increase in weight and complexity of the wiring harness would be prohibitive to production.

With a hypervisor, any topology can be implemented between virtualised nodes with little impact on the car’s BoM. Private channels can be set up through shared memory regions and read-write, read-only or write-only permissions can be enforced. Communication speeds are no longer limited by the electrical properties of a wiring harness, but can be as fast as a memory access. Additionally, authentication and intrusion detection methodologies can be implemented to ensure signals are coming from their intended sources.

 

Software portability

The automotive industry does not like to reinvent the wheel every time a new car is built. Software written for one car must be portable to new vehicles so that code does not have to be re-written. The Autosar standard was developed to address this, allowing software modules to be written by different OEMs and tier-one suppliers against a common standard that makes it possible to map functions and functional networks to different control nodes in the system, almost independently from the associated hardware.

The latest addition to the Autosar ecosystem is the Autosar AP adaptive platform. While the application set of the CP classic platform standard is statically defined when the code is compiled, AP implements a Posix environment designed to allow new applications to be added to a vehicle on the fly. Autosar AP is also written to accommodate the concept of virtual machines: “The AP regards a hardware it runs on as a machine. The rationale behind is that the hardware may be virtualised using various hypervisor related technologies, and to achieve consistent platform view regardless of such.”

However, Autosar AP isn’t designed as a replacement to CP, so it is important that a domain controller is capable of hosting both adaptive and classic platforms. This will allow code already written for CP microcontrollers to run with no modifications and few changes to timing behaviour.

 

Hypervisor choice

There are several embedded hypervisors on the market that all claim to do similar things. Many, however, have been developed by stripping down an existing operating system. Device drivers are kept in this trusted codebase and assigned to guests by a hypervisor service. The additional processing overheads associated with running a real-time operating system on top of another OS could potentially increase the variation in system response time, known as jitter. This would pose challenges when trying to run safety- or timing-critical Autosar software.

The domain controller paradigm closely maps to the separation kernel described by John Rushby in 1981. A separation kernel “recreates, within a single shared machine, an environment which supports the various components of a system, and provides the communications channels between them, in such a way that individual components of a system cannot distinguish this shared environment from a physically distributed one”.

A separation kernel hypervisor is therefore very well suited for deployment in these domain controllers.

 

Conclusion

This article has described a potential solution to a very real problem in the automotive industry – addressing security as the market demands increased autonomy and connectivity in vehicles, while maintaining price-points that make the technologies viable. Using a separation kernel hypervisor within a vehicle domain controller provides a lightweight platform to host virtual machines including Autosar classic platforms as well as state-of-the-art adaptive platforms. Support for classic platforms will allow software written for legacy microcontrollers to be ported to the domain controller, however it is extremely important that the hypervisor is chosen carefully so timing behaviour of safety-critical virtual machines is still predictable.

Chris Barlow is principal systems engineer at Lynx Software Technologies

www.lynx.com

 

Recommend to Colleagues: