4 ms·
I suspect that the solution to unsafe languages like C/C++ will end being a small sanitizer runtime like CFI(https://dslab.epfl.ch/research/cpi/ https://dslab.e
by mathiasgredal 3y ago
I suspect that the solution to unsafe languages like C/C++ will end being a small sanitizer runtime like CFI(https://dslab.epfl.ch/research/cpi/ https://dslab.epfl.ch/research/cpi/), that also supports some form of extended MTE, for memory safety.
For hot parts of the code that the sanitizer can guarantee is safe, either due to it being trivial or with annotations(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2771r0.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p27...), it can safely exclude these checks to limit performance impact.
This seems much more realistic than e.g. Microsoft rewriting Excel in Rust with bug for bug compatibility. It would also benefit Rust code, that has sections marked as unsafe.
- pjmlp 3y agoMicrosoft just announced 10 million dollar effort to make Rust their default systems language for their infrastructure, plus an additional million to the Rust foundation. Yes, stuff like MTE will help, and what you mention is already being used on Android, see HWSAN, and there is now some movement regarding C++ security profiles, however there is still a very long way to go. This is how Microsoft sees improving safety on C++ codebases, "Build Reliable and Secure C++ programs" https://devblogs.microsoft.com/cppblog/build-reliable-and-secure-cpp-programs-microsoft-learn/ https://devblogs.microsoft.com/cppblog/build-reliable-and-se... "Lifetime Safety in C++: Past, Present and Future – CppCon 2023" https://www.youtube.com/watch?v=PTdy65m_gRE&feature=youtu.be https://www.youtube.com/watch?v=PTdy65m_gRE&feature=youtu.be
- jimwhite42 3y ago> Microsoft just announced 10 million dollar effort to make Rust their default systems language for their infrastructure This seems like an incredibly low amount of money to achieve something like that.
- pjmlp 3y agoMight be, yet it sends a strong signal into the industry, specially coming from from one of the companies behind C++. Similar to how clang slowed down as Apple and Google decided to focus on their languages, and key contributors abandoned clang.
- baybal2 3y ago[dead]
- bjackman 3y agoThere is some work in this direction on Linux: https://source.android.com/docs/security/test/hwasan https://source.android.com/docs/security/test/hwasan That site still lists 2x CPU overhead. I am fuzzy on details but I believe some variant is in the works that has low enough overhead to enable in the wild. That site also just says it uses TBI so possibly the performant version I am thinking of is just a version that uses full MTE?