From patchwork Wed Dec 9 00:43:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 340351 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp4275687ejs; Tue, 8 Dec 2020 16:44:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM7kuEPRMNjEC/iW/TNvkuNLRV4vP6xhuBIaRsWP+jcEYrh02Fl1VrY2g2b6MeTxEmhfjv X-Received: by 2002:a17:906:f1cc:: with SMTP id gx12mr1995ejb.164.1607474670017; Tue, 08 Dec 2020 16:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607474670; cv=none; d=google.com; s=arc-20160816; b=EIDiC1cXabUXjBWNrkHrloNwq20q3NiJiTRSG0irDnsRbs9Omwzp16jrWeTP5KK9fN Gs5SmWxov7TJMa84R7LGwIzEKhXbWVbF5xa/NPLMjfovZFs9bMN+CtNKWw2ezcmq6UHI MIMwqDbmwSNOeCWccYAME3kY0f7Y10ftSUogARtZxSnnP8zvHarnp/F9Yu+a98IctKAN 4Nt+7bmA1Tp3KKNQMx1EHthV3uf2qkCuHEbZ0NP11+0jCMPxHcRkCSBpxuxGznhW6nl3 0KekD8MWQFwxppIWMIBs6aaEz6ei8bqiBFIW0fZaBKK88VkaK3tSOZ4SJuw/kigbK2Yq oWEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=DsEub29Fehvc45mIJG7tZWSfnrCimKfcRjRwnCs/e+w=; b=joA64LmrM7azzA+wb6lFw2X357oqpG8dsry9LTycOVp+g6L6Xd+BAlIfSmE5/Nmw5Z vKGrQ+nrNq/rbUTaKMUNLptB3gDim6EWWWaGfsrHvTrQQdWwnqY5Ja5TylqS2xM9j9rn Q7KsBEe0txxEWxot1GtmbyiX9f2K98wVjg+2096/2wg3yf/PZnV2UitbPU80vIIF7Jy1 NIxkHDCr5PThGwMnZmvSBRS5T5SUBTT909433VafBouEVtsmQahnnzhx1A96V4/gFYLt pjRMu5dJ/sWtzdEr3Sikw947/3DWspdf/80eknJL2LtM5Yj5uCj8Wz/tIf1Gxj6wJVZr KVkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="AvLYT/yU"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi11si81777ejb.378.2020.12.08.16.44.29; Tue, 08 Dec 2020 16:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="AvLYT/yU"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729763AbgLIAo0 (ORCPT + 14 others); Tue, 8 Dec 2020 19:44:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729223AbgLIAo0 (ORCPT ); Tue, 8 Dec 2020 19:44:26 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90237C061793 for ; Tue, 8 Dec 2020 16:43:46 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id 4so30855plk.5 for ; Tue, 08 Dec 2020 16:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=DsEub29Fehvc45mIJG7tZWSfnrCimKfcRjRwnCs/e+w=; b=AvLYT/yUAhSYC5femfUz4kHIwylIG466HT23bm5oq79H6ITvvnsFxHSKLIo47OvFVl dRY5YQeoB8DThr93GCkwOPVTQ7sin1crJ1C64Y+PXRcCncooB86AwNFQVSJAiv3WSlBz aTV/+JqPSR7p8onoxHedp6jKj0WB4xQRw0bT8mOHEZ/cfIViTwB67jYTh/FE7uaOsN/N 276zlkF35kUN1VeLDRLGWM6iEH+qQFzhI+paxyzqznu12H0xScXEfIzcKVFu3h6ze8Uu 2GR2Y2yJUJP8ILp19OpTH1lwLkvHHNFyk4XYcyz2akKpAuwkCzdg+r5f2LdMbeHpYzyg 8V/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=DsEub29Fehvc45mIJG7tZWSfnrCimKfcRjRwnCs/e+w=; b=ePEJIkaZPLKNFXhb0DTfEokE4QhCBQCCyzsGVnJtO+4G3o+zcVF7rvgNTaPTmaEPux qxIKrlJmZr0NA2F/ibg1Yy52T5rat0pWZfuRqaQIxJPSPzSvIQau5tFTrDfvBKzidj2e H1Jt+y3X9yD67SjCyphA4F4Nl6BAF525HW0JENxj7m8H1QKRWCOCsjtYkT5AtPEhrtEF CVnca7skLVuzd1ckaOWEg7udKa1w9pGdmuxXwAlDzOpf59Sm39CI0F8SGKaKBb/lTv0n g0igivx33nvK8kAhzreDq9hDRJddvv24Kcv4wXY4I18Jqu+TB44CvbSfNWiqKLSdbmXo +YwQ== X-Gm-Message-State: AOAM532kIZEwYJT3ubUjNfgL9fW4xZmahTBddlu4wHJj64SbbSr54bnY iLopI8UhE2z/fYTNZeULYB5lTA7hNQgB6hLKbeifO/AC3lrKxg== X-Received: by 2002:a17:902:26a:b029:da:af47:77c7 with SMTP id 97-20020a170902026ab02900daaf4777c7mr53021plc.10.1607474625688; Tue, 08 Dec 2020 16:43:45 -0800 (PST) MIME-Version: 1.0 From: Nick Desaulniers Date: Tue, 8 Dec 2020 16:43:34 -0800 Message-ID: Subject: 5.4 and 4.19 warning fix for LLVM_IAS To: Greg KH , Sasha Levin Cc: stable , Dmitry Golovin , Nathan Chancellor , Sedat Dilek , Fangrui Song , Masahiro Yamada , Jian Cai , Manoj Gupta , Luis Lozano Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Dear stable kernel maintainers, (Woah, two in one day; have I exceeded my limit?) Please consider the attached patch for 5.4 and 4.19 for commit b8a9092330da ("Kbuild: do not emit debug info for assembly with LLVM_IAS=1"), which fixes a significant number of warnings under arch/ when assembling a kernel with Clang. These backports have already been shipped in Android; I would like to revert them and take them from syncing with stable. CrOS also has the patches staged, but I would prefer for them to sync them from stable as well. b8a9092330da just landed in v5.10-rc7. I recently read https://lwn.net/Articles/838819/, which mentions a discussion about letting patches have more time to soak in mainline, so I accept if your decision is to wait, though I'll note these have been soaking in Android for 2 days shy of one month (Nov 10). There were minor conflicts due to missing Kbuild support for compressed debug info, which is a feature I implemented but don't plan to backport to stable. We plan to use Clang's integrated assembler for Android and CrOS for 4.19+. See also: https://github.com/ClangBuiltLinux/linux/issues/716. -- Thanks, ~Nick Desaulniers >From 125bcd1867e6b59f4eb364522276bc273e2648e2 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Mon, 9 Nov 2020 10:35:28 -0800 Subject: [PATCH] Kbuild: do not emit debug info for assembly with LLVM_IAS=1 commit b8a9092330da2030496ff357272f342eb970d51b upstream. Clang's integrated assembler produces the warning for assembly files: warning: DWARF2 only supports one section per compilation unit If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for assembly sources (it is still emitted for C sources). This will be re-enabled for newer DWARF versions in a follow up patch. Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with LLVM=1 LLVM_IAS=1 for x86_64 and arm64. Cc: Link: https://github.com/ClangBuiltLinux/linux/issues/716 Reported-by: Dmitry Golovin Reported-by: Nathan Chancellor Suggested-by: Dmitry Golovin Suggested-by: Nathan Chancellor Suggested-by: Sedat Dilek Reviewed-by: Fangrui Song Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada [nd: backport to avoid conflicts from: commit 10e68b02c861 ("Makefile: support compressed debug info") commit 7b16994437c7 ("Makefile: Improve compressed debug info support detection") commit 695afd3d7d58 ("kbuild: Simplify DEBUG_INFO Kconfig handling")] --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index e520dee34490..f8c766b35b71 100644 --- a/Makefile +++ b/Makefile @@ -802,8 +802,11 @@ DEBUG_CFLAGS += -gsplit-dwarf else DEBUG_CFLAGS += -g endif +ifneq ($(LLVM_IAS),1) KBUILD_AFLAGS += -Wa,-gdwarf-2 endif +endif + ifdef CONFIG_DEBUG_INFO_DWARF4 DEBUG_CFLAGS += -gdwarf-4 endif