Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631047 > unrolled thread

[PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS

Started byMatthias Kaehlcke <mka@chromium.org>
First post2017-04-26 00:50 +0200
Last post2017-04-28 02:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Matthias Kaehlcke <mka@chromium.org> - 2017-04-26 00:50 +0200
    Re: [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-04-28 02:40 +0200

#1631047 — [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS

FromMatthias Kaehlcke <mka@chromium.org>
Date2017-04-26 00:50 +0200
Subject[PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
Message-ID<tAhrr-2g4-7@gated-at.bofh.it>
From: Michael Davidson <md@google.com>

The Linux Kernel relies on GCC's acceptance of inline assembly as an
opaque object which will not have any validation performed on the content.
The current behaviour in LLVM is to perform validation of the contents by
means of parsing the input if the MC layer can handle it.

Disable clangs integrated assembler and use the GNU assembler instead.

Wording-mostly-from: Saleem Abdulrasool <compnerd@compnerd.org>
Signed-off-by: Michael Davidson <md@google.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v2:
- Added paragraph explaining why this change is needed
- Updated subject (was: Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGS)

(agreed with Michael to update the patch)

 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 5039b9148d15..3832c8243334 100644
--- a/Makefile
+++ b/Makefile
@@ -710,6 +710,8 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
 # See modpost pattern 2
 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
 KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
+KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
+KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
 else
 
 # These warnings generated too much noise in a regular build.
-- 
2.13.0.rc0.306.g87b477812d-goog

[toc] | [next] | [standalone]


#1632462

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-04-28 02:40 +0200
Message-ID<tB26Z-8k7-3@gated-at.bofh.it>
In reply to#1631047
2017-04-26 7:47 GMT+09:00 Matthias Kaehlcke <mka@chromium.org>:
> From: Michael Davidson <md@google.com>
>
> The Linux Kernel relies on GCC's acceptance of inline assembly as an
> opaque object which will not have any validation performed on the content.
> The current behaviour in LLVM is to perform validation of the contents by
> means of parsing the input if the MC layer can handle it.
>
> Disable clangs integrated assembler and use the GNU assembler instead.
>
> Wording-mostly-from: Saleem Abdulrasool <compnerd@compnerd.org>
> Signed-off-by: Michael Davidson <md@google.com>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---


Applied to linux-kbuild/kbuild.  Thanks!


-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web