Kernel: ABI, GNU C Library, Core Scheduling, Linux 5.4, Randomness, Kernel Concurrency Sanitizer (KCSAN)



-
Monitoring the internal kernel ABI
As part of the Distribution Kernels microconference at Linux Plumbers Conference 2019, Matthias Männich described how the Android project monitors changes to the internal kernel ABI. As Android kernels evolve, typically by adding features and bug fixes from more recent kernel versions, the project wants to ensure that the ABI remains the same so that out-of-tree modules will still function. While the talk was somewhat Android-specific, the techniques and tools used could be applied to other distributions with similar needs (e.g. enterprise distributions).
Männich is on the Google Android kernel team, but is relatively new to the kernel; his background is in build systems and the like. He stressed that he is not talking about the user-space ABI of the kernel, but the ABI and API that the kernel exposes to modules. The idea is to have a stable ABI over the life of an Android kernel. He knows that other distributions have been doing this "for ages", but the Android kernel and build system are different so it made sense to look at other approaches to this problem.
-
System-call wrappers for glibc
The GNU C Library has long had a reputation for being hostile to the addition of wrappers for new Linux system calls; that has resulted in many system calls being unsupported by the library for years. That situation is changing, though. During the Toolchain microconference at the 2019 Linux Plumbers Conference, Maciej Rozycki talked about glibc's new attitude toward system-call wrappers, but also served notice that there is still significant work to do for the addition of any new system call.
Rozycki, who put together the talk with Dmitry Levin, is not the person doing most of this work. He was, instead, "delivering a message from Florian Weimer", who was unable to attend the event.For those who might appreciate a bit of background: applications running in user space do not call directly into the kernel; instead, they will call a wrapper function that knows how to invoke the system call of interest. If nothing else, the wrapper will place the system-call arguments in the right locations and do whatever is necessary to invoke a trap into kernel mode. In some cases, the interface implemented by the wrapper can be significantly different from what the kernel provides.
-
Many uses for Core scheduling
Some new kernel features are welcomed by the kernel development community, while others are a rather harder sell. It is fair to say that core scheduling, which makes CPU scheduling harder by placing constraints on which processes may run simultaneously in a core, is of the latter variety. Core scheduling was the topic of (at least) three different sessions at the 2019 Linux Plumbers Conference. One of the most interesting outcomes, perhaps, is that there are use cases for this feature beyond protection from side-channel attacks.
-
5.4 Merge window, part 1
As of this writing, 9,632 non-merge changesets have been merged for the 5.4 kernel. This merge window is thus off to a strong start. There has been a wide range of changes merged across the kernel tree, including vast numbers of cleanups and fixes.
-
Following Buggy AMD RdRand, The Linux Kernel Will Begin Sanity Checking Randomness At Boot Time
The Linux kernel will begin doing a basic sanity check of x86_64 CPUs with the RdRand instruction to see if it's at least returning "random looking" data otherwise warn the user at boot time. This stems from a recent issue where AMD's RdRand behavior with some hardware (particularly, buggy motherboards) could have borked RdRand issues.
-
Google Is Uncovering Hundreds Of Race Conditions Within The Linux Kernel
One of the contributions Google is working on for the upstream Linux kernel is a new "sanitizer". Over the years Google has worked on AddressSanitizer for finding memory corruption bugs, UndefinedBehaviorSanitizer for undefined behavior within code, and other sanitizers. The Linux kernel has been exposed to this as well as other open-source projects while their newest sanitizer is KCSAN and focused as a Kernel Concurrency Sanitizer.
-
Kernel Concurrency Sanitizer (KCSAN)
We would like to share a new data-race detector for the Linux kernel: Kernel Concurrency Sanitizer (KCSAN) -- https://github.com/google/ktsan/wiki/KCSAN (Details: https://github.com/google/ktsan/blob/kcsan/Documentation/dev-tools/kcsan.rst) To those of you who we mentioned at LPC that we're working on a watchpoint-based KTSAN inspired by DataCollider [1], this is it (we renamed it to KCSAN to avoid confusion with KTSAN). [1] http://usenix.org/legacy/events/osdi10/tech/full_papers/Erickson.pdf In the coming weeks we're planning to: * Set up a syzkaller instance. * Share the dashboard so that you can see the races that are found. * Attempt to send fixes for some races upstream (if you find that the kcsan-with-fixes branch contains an important fix, please feel free to point it out and we'll prioritize that). There are a few open questions: * The big one: most of the reported races are due to unmarked accesses; prioritization or pruning of races to focus initial efforts to fix races might be required. Comments on how best to proceed are welcome. We're aware that these are issues that have recently received attention in the context of the LKMM (https://lwn.net/Articles/793253/). * How/when to upstream KCSAN? Feel free to test and send feedback. Thanks, -- Marco
-

- Login or register to post comments
Printer-friendly version- 2693 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago