From patchwork Tue Apr 25 22:47:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9700017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1961A60245 for ; Tue, 25 Apr 2017 22:48:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0030C28423 for ; Tue, 25 Apr 2017 22:48:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6E3B283FE; Tue, 25 Apr 2017 22:48:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AE5D283FE for ; Tue, 25 Apr 2017 22:48:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1953466AbdDYWsf (ORCPT ); Tue, 25 Apr 2017 18:48:35 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:37347 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033205AbdDYWse (ORCPT ); Tue, 25 Apr 2017 18:48:34 -0400 Received: by mail-it0-f51.google.com with SMTP id x188so85691939itb.0 for ; Tue, 25 Apr 2017 15:48:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mkn1UmB5t1j080gSQI0i73qeQ91PsVtZ9+888rDIh/8=; b=ltlu86GqeVVglrnTMuO2JOh/E7TkHJh+HHOzVZ7CoAMCFZBHbz5p/vU0ouNyjaS9Og MI+orHb4oII5Jb7pWl5BSZWO0orsiA877FCAXAHauwZ6e2dUlnpUvFgcxm0xhYkM63Sq mnnSk4aebNo85QVHV5R0xTV5t3Hb0R2QksZm/q//CKDUtW1oCB5YBKz/WisehuAvNWwc 2Z7Y/YYRe3dN5D24XkqYEmBCD4xE+UWyA/5DfG4fK8COEgUQyngG89k9zx2kqFuE5cH+ bv6XTesb6fFT806BxdJOgQW7r6AaW/2+AW9W2hmwC49+DMfuGZpz/7ahnOMXFINNgMqX bbjw== X-Gm-Message-State: AN3rC/73rWPoRRqtq1ejxzMK5MN5ws/+Hvy5YdAoOp5PCAq6BJ9Qt5it 6bs9BSaUbSSCWQw9 X-Received: by 10.36.111.199 with SMTP id x190mr7959993itb.36.1493160513676; Tue, 25 Apr 2017 15:48:33 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.64.162]) by smtp.gmail.com with ESMTPSA id y125sm2922975itb.4.2017.04.25.15.48.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Apr 2017 15:48:33 -0700 (PDT) From: Matthias Kaehlcke To: Masahiro Yamada , Michal Marek , Michael Davidson Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler , Greg Hackmann , Saleem Abdulrasool , Matthias Kaehlcke Subject: [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS Date: Tue, 25 Apr 2017 15:47:35 -0700 Message-Id: <20170425224735.131835-1-mka@chromium.org> X-Mailer: git-send-email 2.13.0.rc0.306.g87b477812d-goog Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michael Davidson 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 Signed-off-by: Michael Davidson Signed-off-by: Matthias Kaehlcke --- 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.