Speaker
Description
The CTFv4 extension of the CTF file format into a superset of BTF is nearly complete. Once it's working, what can we do with systemwide type information for all C programs?
One possibility we explore in this talk is to use some simple linker extensions to provide real-time, linear-time ABI checking in ld.so to determine for every running program whether any of the C libraries it uses has changed incompatibly since the program was linked in a way that breaks the program, without linking ld.so with libctf or requiring it to do anything more difficult than a few equality comparisons and strcmps.
The end goal is to be able to see something like this
emacs
warning: libxml.so.2.13.9: incompatible symbol: linked against
xmlDocPtr xmlReadMemory (const char , int, const char , const char , int)
but running against
xmlDocPtr xmlReadMemory (const char , int, const char , const char )
(a contrived example: xmlReadMemory has not actually broken ABI. ld.so invokes a helper program that uses libctf to print that output, but does not itself need to use libctf.)
This is only partly written so far: we explore the design of this scheme in part so that the audience can spot any serious errors before it causes widespread breakage, and to see if people can suggest improvements to the general design.