Description

Livepatching can be described as replacing a faulty, bugged function with another function that contains the fix for the problem. This process requires the livepatch developer to extract the code from the project in question (e.g. glibc, openssl) in such a way to create a single shared object file (.so) that can be loaded within all processes that uses such library.

Currently, for C projects, we have a source-to-source compiler named clang-extract, which is able to extract the necessary code content and do the necessary transformations, resulting in a single .c file that can be compiled into a shared object file. The issue with this approach is the requirement of maintaining this compiler, which only works for C (and perhaps C++).

Now, instead we do source-to-source compiler and ship .c files for livepatches, we can use the existing compiler (gcc) to extract the code and transform it for our needs. This would expand our livepatching language support to any language that gcc supports (C, C++, Fortran, go, ...) with a consequence of not outputing .c files, as the source-code for the livepatch would be an annotated source tree of the original project.

Goals

Prototype a version of GCC which is capable of doing this. The main goal is to reimplement the algorithms in clang-extract (clang's C/C++ AST frontend) into gcc's GENERIC/GIMPLE middle end.

Resources

• clang-extract source code: https://github.com/SUSE/clang-extract/

• gcc github mirror with existing code: https://github.com/giulianobelinassi/gcc/tree/symbol_closure

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 24

Activity

  • 16 days ago: horon liked this project.
  • 17 days ago: mbrugger liked this project.
  • 22 days ago: mpdesouza liked this project.
  • 22 days ago: epaolantonio liked this project.
  • 22 days ago: vliaskovitis liked this project.
  • 23 days ago: gbelinassi originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    This project is one of its kind!