Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting to a newer version of LLVM #11

Open
obraunsdorf opened this issue Oct 13, 2019 · 1 comment
Open

Porting to a newer version of LLVM #11

obraunsdorf opened this issue Oct 13, 2019 · 1 comment

Comments

@obraunsdorf
Copy link

Hi,
what do you think would be the main challenge for porting Softbound/CETS to a more current version of LLVM (8.0 or higher)? Is it feasible? Do you know someone who tried this already?

Thanks in advance :)

@santoshn
Copy link
Owner

I think getting a working prototype for LLVM-9 is easy. The main challenge will be reducing overheads to less than 2X for both spatial and temporal memory safety.

Here are the main challenges:

  1. Inlining all the checks for performance. I was relying on LTO and LLVM-LD to inline all the checks. It needs to be rethought for LLVM-9.

  2. Metadata propagation for arguments and returns. I used a shadow stack to pass arguments and returns. It adds performance overheads with small functions. It also can introduce issues when compilers optimize function arguments. Here is an example in the paper: https://www.cs.rutgers.edu/~santosh.nagarakatte/papers/plas2017.pdf

  3. Handling first class vectors and structures.

  4. Handling global initializers and external libraries. Ideally you would recompile everything with SoftBoundCETS pass, then handling libraries is easy. Otherwise, you may want to write wrappers.
    In contrast to sanitizers, you need to maintain metadata with each pointers and hence the compiler instrumentation is a bit more involved.

  5. Use linear addressing for accessing metadata similar to other sanitizers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants