On Mon, Jan 25, 2021 at 12:08 PM Linus Torvalds <[email protected]> wrote: > > On Mon, Jan 25, 2021 at 12:03 PM Sami Tolvanen <[email protected]> > wrote: > > > > Neither, I noticed this because the conflicting function declarations > > broke Clang's Control Flow Integrity checking. > > Ahh, interesting. Is that automated somewhere, or are you running your > own special checks? It sounds like a useful thing.
I’m running a continuous integration script locally, which tests a few basic kernel configurations with CFI to ensure they compile and boot. We’re using CFI in Android kernels, so this helps catch issues before they reach stable kernels. > I was thinking that maybe I should make some sparse-based cross-file > checker, but it sounds like -fsanitize=cfi (or whatever it is you do) > catches it. That might still be useful, because CFI only adds runtime checking. It’s primarily a mitigation against code reuse attacks, but it does find these types of issues occasionally. Sami

