mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + kasan-add-compiler-support-for-clang.patch added to -mm tree
@ 2017-12-15 23:56 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-12-15 23:56 UTC (permalink / raw)
  To: paullawrence, aryabinin, dvyukov, ghackmann, glider, mka,
	yamada.masahiro, mm-commits


The patch titled
     Subject: kasan: add compiler support for clang
has been added to the -mm tree.  Its filename is
     kasan-add-compiler-support-for-clang.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kasan-add-compiler-support-for-clang.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kasan-add-compiler-support-for-clang.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Paul Lawrence <paullawrence@google.com>
Subject: kasan: add compiler support for clang

Patch series "kasan: support alloca, LLVM", v4.


This patch (of 5):

For now we can hard-code ASAN ABI level 5, since historical clang builds
can't build the kernel anyway.  We also need to emulate gcc's
__SANITIZE_ADDRESS__ flag, or memset() calls won't be instrumented.

Link: http://lkml.kernel.org/r/20171204191735.132544-2-paullawrence@google.com
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/compiler-clang.h |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -puN include/linux/compiler-clang.h~kasan-add-compiler-support-for-clang include/linux/compiler-clang.h
--- a/include/linux/compiler-clang.h~kasan-add-compiler-support-for-clang
+++ a/include/linux/compiler-clang.h
@@ -19,3 +19,11 @@
 
 #define randomized_struct_fields_start	struct {
 #define randomized_struct_fields_end	};
+
+/* all clang versions usable with the kernel support KASAN ABI version 5 */
+#define KASAN_ABI_VERSION 5
+
+/* emulate gcc's __SANITIZE_ADDRESS__ flag */
+#if __has_feature(address_sanitizer)
+#define __SANITIZE_ADDRESS__
+#endif
_

Patches currently in -mm which might be from paullawrence@google.com are

kasan-add-compiler-support-for-clang.patch
kasan-support-alloca-poisoning.patch
kasan-add-tests-for-alloca-poisoning.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-15 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 23:56 + kasan-add-compiler-support-for-clang.patch added to -mm tree akpm

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).