From patchwork Thu Mar 16 15:51:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Elver X-Patchwork-Id: 13177933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1037C6FD1F for ; Thu, 16 Mar 2023 15:51:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 50CFF900003; Thu, 16 Mar 2023 11:51:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 496F5900002; Thu, 16 Mar 2023 11:51:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35D18900003; Thu, 16 Mar 2023 11:51:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2351A900002 for ; Thu, 16 Mar 2023 11:51:18 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id EDCC9161376 for ; Thu, 16 Mar 2023 15:51:17 +0000 (UTC) X-FDA: 80575200594.17.04582CC Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) by imf22.hostedemail.com (Postfix) with ESMTP id 30D1CC0007 for ; Thu, 16 Mar 2023 15:51:15 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BaozqFKk; spf=pass (imf22.hostedemail.com: domain of 38joTZAUKCNsBISBODLLDIB.9LJIFKRU-JJHS79H.LOD@flex--elver.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=38joTZAUKCNsBISBODLLDIB.9LJIFKRU-JJHS79H.LOD@flex--elver.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678981876; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=ExLMwJzNgwWRHjnTjtALJSPVKx9BbSWtrYmWXQLM/Bk=; b=dUqsM+GOhc0ILWLzQMjV3ao6FklgZSNT6sePgX+zOroD03ZKOa3sQOI72klgFz6wB4pwCQ TGp/MEp0Hm0t3Y9leP10YmGyDVghAhNKC0IIABDgN67MfxJ0dsPXbtyevKbd80rJP68FcW OY0A67b16LRaYMbBRk3Z3BmM+FWQcxM= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BaozqFKk; spf=pass (imf22.hostedemail.com: domain of 38joTZAUKCNsBISBODLLDIB.9LJIFKRU-JJHS79H.LOD@flex--elver.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=38joTZAUKCNsBISBODLLDIB.9LJIFKRU-JJHS79H.LOD@flex--elver.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678981876; a=rsa-sha256; cv=none; b=u5hCh7qILaKCL16xJkVUc8iFw2f6xlRl4nZ+58JiB8lLpx+BwAzg08lNGUYaRTwV7dFzBa OrzTUTMXmzE2pnvp01zo6orHsxVswaTF++n8N7f8Ermiuq5ClWFvVy1LyqQgRoDYKdlDyZ fl3sK04b/H6DwKu+oBmd34O02TWufkc= Received: by mail-ed1-f73.google.com with SMTP id es16-20020a056402381000b004fa3e04c882so3646643edb.10 for ; Thu, 16 Mar 2023 08:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678981874; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ExLMwJzNgwWRHjnTjtALJSPVKx9BbSWtrYmWXQLM/Bk=; b=BaozqFKkD3sCcThM3kJ0CJeU1oKVvG2IZTEZYRhcVPVNMkZ1lFzWF9as+MMZ8hsld7 tZ3GmrajONdoZqutkUpFP17bnuQ/1GSMT+4xd5Z0upJdJchDmE5BiRfjKY7kKS4mrZem NJsUJendQeheVIikqG7slo7ctosxTk0J/IANNs9/xvgYw2BbqggYZTXPLMQDq7WxBvS4 NdWvxaHOdqZ5eUoP9yCwMRgeFncikGyhyqzUJ1IoIlLYH5H2hJCWGH+xjlVSQnVjDARK xstaHNw72Eu5bUEcZiJfIVBSYiXVOPFhGNIZ5RMPCG2zaog+4lxteu0Hqpd31h/TmoOx nZLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678981874; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ExLMwJzNgwWRHjnTjtALJSPVKx9BbSWtrYmWXQLM/Bk=; b=QhCystFPkb/sRnjBSTrAfsxltKvNozEp5NBLMASQdo8PdV7Wqhe+/uQF+GUIGOIrmb FWAuRxRF4qu8QyLna1MuQaMl1KIXLfXAIO18LP8F2ppfomnTxqI7c+FVQxxfeYQo+VE9 SXrD+uKnCzMj2C0BgVHBRmc6yGdRfWhBRJ3XbLcHSQR2hzWUBKAKtRDodt0blhpIaRic xakc2SdJGSl3O41bb03Oo05GkdTMRLECpF6MiiLUe1ja2bPhoDsnyP548GAQmZA/ZJaf YpfQGwhZwE45hrzQhxVrL4FLjP0IOItOJwYSYvRzLwC4aG9cmx+/BPyJpO1okbl2TdSZ PIwQ== X-Gm-Message-State: AO0yUKVE4sy4ycMW/5h+ZBpj8vZ19a44Kko8IlyuSo/SpyqEdeO56ulH 5hmO2PyEjYhq1s+eT1OQ2no7bSplXw== X-Google-Smtp-Source: AK7set/LJ2SDmH3RPj1qgIEPYl3gP+fJLKcu8qRdtwUXHzgL+9elI1ulbLS4ORh4eNFQaUU+1RVlcmM3pA== X-Received: from elver.muc.corp.google.com ([2a00:79e0:9c:201:f359:6b95:96e:1317]) (user=elver job=sendgmr) by 2002:a50:ce1a:0:b0:4bb:e549:a2ad with SMTP id y26-20020a50ce1a000000b004bbe549a2admr43911edi.4.1678981874737; Thu, 16 Mar 2023 08:51:14 -0700 (PDT) Date: Thu, 16 Mar 2023 16:51:04 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog Message-ID: <20230316155104.594662-1-elver@google.com> Subject: [PATCH] kfence, kcsan: avoid passing -g for tests From: Marco Elver To: elver@google.com, Andrew Morton Cc: Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Nathan Chancellor X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: kbdo17wujkswmfso4q11t5fx9f7tdx83 X-Rspamd-Queue-Id: 30D1CC0007 X-HE-Tag: 1678981875-641176 X-HE-Meta: U2FsdGVkX1/dOCE6Ti3TpFhQdFtkqzauS9XDmQnhMN2iwaY1oX9Ymq/J6MViV/lzaBWcZsOBcQ8Sj3PvpZxbLS236+Uv2M4Zu4WUs5ibruafjqWRf6Uo5SIqDmWcYIxFSezhE1pMv/b9t/tWzND7gC+1j7o+lXWH/vVvNktv5SBmbADaX/UOegt3DeLtCbTTikbcDmHUnU72IAxD10HhuKKm3SwNi/Q1FSGvaT0zSYOxuq3ZgPwfZp5g41Jflo7QrSsI9Ex9hFlzapwLQcH29UDw8h7WZCWa2pFiH5PLS65Lk5zDa4UGG62sYkIYr7pdC7aci4FcTUg7YI5UFGydkovlpThj4ASIhww5AJvvFHNqPEA/wumG+wwTFUuWCaaGVXm09MclWSA8P5nD5+AG2DR7TxllAgQy7PudcDPN9qaE6jTx7vBpWaCR0+Rg8pa08iWAOQcoXb6BncQEwbYUq8XG+BNd1I6Owz2GnI43x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tXnih2tyJcYqEMm19J9kmcBRjyT9fSH+dcPajFLJCPnTEs+9Y9sbf5AARHS1WL3JFW4amz/Bso3i5Q95drDfB2AULSWNxoRY5Jig7jveR0LMScSo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Nathan reported that when building with GNU as and a version of clang that defaults to DWARF5: $ make -skj"$(nproc)" ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ LLVM=1 LLVM_IAS=0 O=build \ mrproper allmodconfig mm/kfence/kfence_test.o /tmp/kfence_test-08a0a0.s: Assembler messages: /tmp/kfence_test-08a0a0.s:14627: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14628: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14632: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14633: Error: non-constant .uleb128 is not supported /tmp/kfence_test-08a0a0.s:14639: Error: non-constant .uleb128 is not supported ... This is because `-g` defaults to the compiler debug info default. If the assembler does not support some of the directives used, the above errors occur. To fix, remove the explicit passing of `-g`. All these tests want is that stack traces print valid function names, and debug info is not required for that. I currently cannot recall why I added the explicit `-g`. Reported-by: Nathan Chancellor Signed-off-by: Marco Elver Reviewed-by: Nathan Chancellor --- kernel/kcsan/Makefile | 2 +- mm/kfence/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile index 8cf70f068d92..a45f3dfc8d14 100644 --- a/kernel/kcsan/Makefile +++ b/kernel/kcsan/Makefile @@ -16,6 +16,6 @@ obj-y := core.o debugfs.o report.o KCSAN_INSTRUMENT_BARRIERS_selftest.o := y obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o -CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer +CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -fno-omit-frame-pointer CFLAGS_kcsan_test.o += $(DISABLE_STRUCTLEAK_PLUGIN) obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o diff --git a/mm/kfence/Makefile b/mm/kfence/Makefile index 0bb95728a784..2de2a58d11a1 100644 --- a/mm/kfence/Makefile +++ b/mm/kfence/Makefile @@ -2,5 +2,5 @@ obj-y := core.o report.o -CFLAGS_kfence_test.o := -g -fno-omit-frame-pointer -fno-optimize-sibling-calls +CFLAGS_kfence_test.o := -fno-omit-frame-pointer -fno-optimize-sibling-calls obj-$(CONFIG_KFENCE_KUNIT_TEST) += kfence_test.o