[PATCH v7 0/8] fortify: Add Clang support

From: Kees Cook
Date: Tue Feb 08 2022 - 17:53:59 EST


Hi,

This is the updated series for getting Clang to work with
CONFIG_FORTIFY_SOURCE. We went around a few times since v6 on dealing
with -ffreestanding (thank you Nick for figuring out the root cause),
and are dropping X86_32 support until the associated Clang bug is fixed.

I also split up the last patch, since it was doing a bunch of separate
changes, which seemed better as separate patches.

Thanks!

-Kees

v1: https://lore.kernel.org/linux-hardening/20210727205855.411487-61-keescook@xxxxxxxxxxxx/
v2: https://lore.kernel.org/linux-hardening/20210818060533.3569517-64-keescook@xxxxxxxxxxxx/
v3: https://lore.kernel.org/linux-hardening/20211213223331.135412-18-keescook@xxxxxxxxxxxx/
v4: https://lore.kernel.org/linux-hardening/20220130182204.420775-1-keescook@xxxxxxxxxxxx/
v5: https://lore.kernel.org/linux-hardening/20220202003033.704951-1-keescook@xxxxxxxxxxxx/
v6: https://lore.kernel.org/linux-hardening/20220203173307.1033257-1-keescook@xxxxxxxxxxxx/
v7:
- split last patch into separate logical change patches
- drop X86_32 support for now


Kees Cook (8):
fortify: Replace open-coded __gnu_inline attribute
Compiler Attributes: Add __pass_object_size for Clang
Compiler Attributes: Add __overloadable for Clang
Compiler Attributes: Add __diagnose_as for Clang
fortify: Make pointer arguments const
fortify: Use __diagnose_as() for better diagnostic coverage
fortify: Make sure strlen() may still be used as a constant expression
fortify: Add Clang support

include/linux/compiler_attributes.h | 39 +++++++++++++++++++
include/linux/fortify-string.h | 58 +++++++++++++++++++++--------
security/Kconfig | 5 ++-
3 files changed, 85 insertions(+), 17 deletions(-)

--
2.30.2