linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
@ 2017-04-25 22:47 Matthias Kaehlcke
  2017-04-28  0:36 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-04-25 22:47 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek, Michael Davidson
  Cc: linux-kbuild, linux-kernel, Grant Grundler, Greg Hackmann,
	Saleem Abdulrasool, Matthias Kaehlcke

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

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

* Re: [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
  2017-04-25 22:47 [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Matthias Kaehlcke
@ 2017-04-28  0:36 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2017-04-28  0:36 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Michal Marek, Michael Davidson, Linux Kbuild mailing list,
	Linux Kernel Mailing List, Grant Grundler, Greg Hackmann,
	Saleem Abdulrasool

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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 22:47 [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Matthias Kaehlcke
2017-04-28  0:36 ` Masahiro Yamada

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