Conversation

Have you seen Samsung's kernel CFI implementation from before they gave up and moved to Google's upstream Clang CFI? It's the most horrifying thing and by that I mean they pass compiled kernel code through a Python script using objdump to add CFI instrumentation as a total hack.
2
17
So, Clang CFI figures out all the functions that aren't indirectly callable from the fact that their address isn't taken and they aren't exported (works well with -fvisibility=hidden) and then enforces type-based CFI for the indirect calls where that's not the case.
1
1
Samsung's horrible CFI only prevented indirect calls not calling an actual function. It had no compiler analysis or anything since it was literally just a Python script post-processing the disassembled code (via objdump). Haven't seen many worse things done with computers.
1
4
Show replies