lkml.org 
[lkml]   [2022]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/4 v5] fortify: Add Clang support
Date
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/
v2: https://lore.kernel.org/linux-hardening/20210818060533.3569517-64-keescook@chromium.org/
v3: https://lore.kernel.org/linux-hardening/20211213223331.135412-18-keescook@chromium.org/
v4: https://lore.kernel.org/linux-hardening/20220130182204.420775-1-keescook@chromium.org/
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

\
 
 \ /
  Last update: 2022-02-02 01:31    [W:0.115 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site