linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4 v5] fortify: Add Clang support
@ 2022-02-02  0:30 Kees Cook
  2022-02-02  0:30 ` [PATCH 1/4] Compiler Attributes: Add Clang's __pass_object_size Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Kees Cook @ 2022-02-02  0:30 UTC (permalink / raw)
  To: Kees Cook
  Cc: Miguel Ojeda, Nick Desaulniers, Nathan Chancellor,
	George Burgess IV, linux-kernel, llvm, linux-hardening,
	linux-security-module

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-02-04  0:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02  0:30 [PATCH 0/4 v5] fortify: Add Clang support Kees Cook
2022-02-02  0:30 ` [PATCH 1/4] Compiler Attributes: Add Clang's __pass_object_size Kees Cook
2022-02-02  1:11   ` Miguel Ojeda
2022-02-02  1:13     ` Miguel Ojeda
2022-02-02 21:09     ` Kees Cook
2022-02-02 21:19       ` Miguel Ojeda
2022-02-02  0:30 ` [PATCH 2/4] Compiler Attributes: Add __overloadable Kees Cook
2022-02-02  0:30 ` [PATCH 3/4] Compiler Attributes: Add __diagnose_as Kees Cook
2022-02-02  0:30 ` [PATCH 4/4 v5] fortify: Add Clang support Kees Cook
2022-02-02 21:22   ` Nick Desaulniers
2022-02-03  3:15     ` Kees Cook
2022-02-02 21:27   ` Nick Desaulniers
2022-02-03  3:18     ` Kees Cook
2022-02-03 22:13   ` Nick Desaulniers
2022-02-03 22:28     ` Miguel Ojeda
2022-02-04  0:28     ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).