[PATCH] D109967: Simplify handling of builtin with inline redefinition

Kees Cook via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 27 14:47:03 PDT 2021


kees added a comment.

I'm setting up to test this patch (thank you!) using my current kernel FORTIFY improvements. Right now I have a bunch of compile-time behavior selftests written:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/overflow&id=3c5221f3f4fd865a780f544b72c68f4209bd2e76

It should be possible to do an A/B test against those from the kernel's view of its FORTIFY functions. However, due to other bugs with __builtin_object_size(), the kernel still can't use name-matched inlines:
https://github.com/ClangBuiltLinux/linux/issues/1401
i.e. D109967 <https://reviews.llvm.org/D109967> will fix half of what is needed, but the plan in the kernel right now is to work around the problem entirely by using macros instead.

I'll report back on the results of my testing, though, since it should give a good sense of how much coverage the kernel can gain back with this bug fixed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109967/new/

https://reviews.llvm.org/D109967



More information about the cfe-commits mailing list