Zack's Kernel News
Zack's Kernel News

Zack Brown reports on fixing printk() bit by bit, kernel internationalization (or not), and kernel encryption and secure boot.
Fixing printk() Bit by Bit
The printk()
system call is an important way for the kernel to produce logs and other messages. The kernel doesn't use any standard library functions like printf()
, so it has to roll its own. But by all accounts, printk()
is a mess.
Recently, Sergey Senozhatsky tried to spruce it up a little and avoid some potential deadlocks. There was a whole range of deadlocks caused by printk()
recursing onto itself, and Sergey didn't want to touch any of those. But he said there were plenty of non-recursive deadlock scenarios that needed to be fixed.
Specifically, there were ways to deadlock the system in the output console, and printk()
would trigger those deadlocks by trying to write to the console. To fix some of these, Sergey wanted to introduce some new helper functions for the TTY (used to implement the console) and UART code (used to communicate asynchronously with the console).
[...]
Buy this article as PDF
(incl. VAT)