[PATCH 0/4 v5] fortify: Add Clang support
From: Kees Cook <hidden>
Date: 2022-02-02 00:30:39
Also in:
linux-hardening, lkml, llvm
Hi, So, after looking at v4 at little longer I decided that it is just too invasive. After spending time researching the primary issue that needed to be worked around (__builtin_object_size(p, 1) not working from inlines), I got some help from gbiv to use some Clang-specific attributes to get the same effect. I think the result is much less invasive, and it even lets us easily expand size verification coverage into non-inlines if we ever want to. Please take a look. :) -Kees v1: https://lore.kernel.org/linux-hardening/20210727205855.411487-61-keescook@chromium.org/ (local) v2: https://lore.kernel.org/linux-hardening/20210818060533.3569517-64-keescook@chromium.org/ (local) v3: https://lore.kernel.org/linux-hardening/20211213223331.135412-18-keescook@chromium.org/ (local) v4: https://lore.kernel.org/linux-hardening/20220130182204.420775-1-keescook@chromium.org/ (local) v5: - rewritten to use Clang attributes Kees Cook (4): Compiler Attributes: Add Clang's __pass_object_size Compiler Attributes: Add __overloadable Compiler Attributes: Add __diagnose_as fortify: Add Clang support include/linux/compiler_attributes.h | 29 ++++++++++++++++ include/linux/fortify-string.h | 52 ++++++++++++++++++++--------- security/Kconfig | 2 +- 3 files changed, 67 insertions(+), 16 deletions(-) -- 2.30.2