[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220202003033.704951-1-keescook@chromium.org>
Date: Tue, 1 Feb 2022 16:30:29 -0800
From: Kees Cook <keescook@...omium.org>
To: Kees Cook <keescook@...omium.org>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
George Burgess IV <gbiv@...gle.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
linux-hardening@...r.kernel.org,
linux-security-module@...r.kernel.org
Subject: [PATCH 0/4 v5] fortify: Add Clang support
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
Powered by blists - more mailing lists