February 26, 2020

252 words 2 mins read

The Problems Emulating a Call via Breakpoint in the Kernel

The Problems Emulating a Call via Breakpoint in the Kernel

The Linux kernel is the lowest layer of software (above BIOS) and that requires it to be as efficient as possible. Recent hardware issues have arisen (Spectre and Meltdown) that caused the Linux kerne …

Talk Title The Problems Emulating a Call via Breakpoint in the Kernel
Speakers Steven Rostedt (Open Source Engineer, VMware Inc)
Conference Open Source Summit + ELC North America
Conf Tag
Location San Diego, CA, USA
Date Aug 19-23, 2019
URL Talk Page
Slides Talk Slides
Video

The Linux kernel is the lowest layer of software (above BIOS) and that requires it to be as efficient as possible. Recent hardware issues have arisen (Spectre and Meltdown) that caused the Linux kernel to have to take measures to protect itself, but these measures have also had significant impact to performance. One solution was the addition of retpolines, but these slow down indirect calls, which is highly used by trace events. Work has been started to create dynamic call sites in the kernel to handle these cases. But to make these modifications, breakpoints must be used, and emulating calls from breakpoints has various issues. This talk will describe retpolines, why dynamic call sites help, and explain the issues as well as various solutions (spoiler, they all suck) to emulating calls with breakpoints. The same issue has recently come up with handling function tracing and live kernel patching, and those will also be explained. Come to this talk to get a good idea of why most kernel developers have gray hair.

comments powered by Disqus