Message ID | 20211130114433.2580590-13-elver@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 17D96C433EF for <linux-mm@archiver.kernel.org>; Tue, 30 Nov 2021 11:51:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 930476B0087; Tue, 30 Nov 2021 06:45:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DFE46B0088; Tue, 30 Nov 2021 06:45:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E7396B0089; Tue, 30 Nov 2021 06:45:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0178.hostedemail.com [216.40.44.178]) by kanga.kvack.org (Postfix) with ESMTP id 5EA1D6B0087 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 06:45:44 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 29F4B182AB1E6 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 11:45:34 +0000 (UTC) X-FDA: 78865416588.30.093FBDC Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) by imf06.hostedemail.com (Postfix) with ESMTP id 5AF46801AB10 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 11:45:32 +0000 (UTC) Received: by mail-ed1-f73.google.com with SMTP id p4-20020aa7d304000000b003e7ef120a37so16631101edq.16 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 03:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=e4DEXl9ENL8f6grIX8Smd5WFfYq3AcFIjaS7u+NEo6I=; b=VRFC3Sd61/1Tk7+lMqH9mkXHzsXrk6VDRpNr/RODxLb0s8opBH5XBdY0sCSwlL4os0 aNipizz3jan6hjYbfkih51nEKluedB8DR5M+li6i6hvW06Y0WJ5x5tx3zq2x3JKh92zp beJxpvn/kGN1x6ljKuhUDI2IbBAwSqkUeaN+7HU3YpFEvrF+c/6aydWsQctO4Ymd0udk IJ84ZzgzCmWkNlqi/QghFcQ2djhgKy4WBgUVGPVv6c4CskqMJrMZy7XrZOPfGlo9LN1Z 65TsX2NnW+8SOrVW+OK5wZAA3QUZMDcz6AMizaKTb/XX111gUThqKlkXg/p7apaNndAq SUZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=e4DEXl9ENL8f6grIX8Smd5WFfYq3AcFIjaS7u+NEo6I=; b=hRNLK7VO+HWHReiR3harROtigrYyGZKnkYR2eDDV0TmDco9VYRVljvboTuyG057i8Q lA/8qSu5M9f7Aa30G8TulQR3mq50eRG4sQP04ufL09FdaM3y2fjGMZedC+qlP920iMDt 9OU1+LFCM8XjhR+MFaHlxi9fYqP1uCnaVaIbz3tt2cvE9HCSBAwMaznZ1X5ORlzTBiCE Pyp2mQFRSVIBRktejFOqeJSBp4+o56D16nZ2sGmPyTJGyxCTy2Ig77BrnpumPQKaEe56 Y9BX1a9n1FdkDkeCL0576GdmSYuNrvCiS/sTAvw7uYNqoFOFKTzQdBRnMjKJE4mdZfN3 fnXA== X-Gm-Message-State: AOAM530bZ0huWiiICR24mKhCha8LFk5t0eHxLfJ97QTrCXgntRW1+jdS Ny53+5dOmL5lLZxGltyxQRGyo+ALow== X-Google-Smtp-Source: ABdhPJz7RyZqdN7S4/+caxzBBOK3JiCGoO88loaeaBFa4FUTBsvk6hn509wWF6mKeqicro2oUCPsrxEoNg== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:86b7:11e9:7797:99f0]) (user=elver job=sendgmr) by 2002:a17:907:3f29:: with SMTP id hq41mr66294129ejc.216.1638272732309; Tue, 30 Nov 2021 03:45:32 -0800 (PST) Date: Tue, 30 Nov 2021 12:44:20 +0100 In-Reply-To: <20211130114433.2580590-1-elver@google.com> Message-Id: <20211130114433.2580590-13-elver@google.com> Mime-Version: 1.0 References: <20211130114433.2580590-1-elver@google.com> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog Subject: [PATCH v3 12/25] kcsan: Ignore GCC 11+ warnings about TSan runtime support From: Marco Elver <elver@google.com> To: elver@google.com, "Paul E. McKenney" <paulmck@kernel.org> Cc: Alexander Potapenko <glider@google.com>, Boqun Feng <boqun.feng@gmail.com>, Borislav Petkov <bp@alien8.de>, Dmitry Vyukov <dvyukov@google.com>, Ingo Molnar <mingo@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Waiman Long <longman@redhat.com>, Will Deacon <will@kernel.org>, kasan-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 5AF46801AB10 X-Stat-Signature: eqjasansicx3e98tq8ww34of1kh4xrmy Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=VRFC3Sd6; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 33A6mYQUKCKUJQaJWLTTLQJ.HTRQNSZc-RRPaFHP.TWL@flex--elver.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=33A6mYQUKCKUJQaJWLTTLQJ.HTRQNSZc-RRPaFHP.TWL@flex--elver.bounces.google.com X-HE-Tag: 1638272732-694929 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: <linux-mm.kvack.org> |
Series |
kcsan: Support detecting a subset of missing memory barriers
|
expand
|
diff --git a/scripts/Makefile.kcsan b/scripts/Makefile.kcsan index 4c7f0d282e42..19f693b68a96 100644 --- a/scripts/Makefile.kcsan +++ b/scripts/Makefile.kcsan @@ -13,6 +13,12 @@ kcsan-cflags := -fsanitize=thread -fno-optimize-sibling-calls \ $(call cc-option,$(call cc-param,tsan-compound-read-before-write=1),$(call cc-option,$(call cc-param,tsan-instrument-read-before-write=1))) \ $(call cc-param,tsan-distinguish-volatile=1) +ifdef CONFIG_CC_IS_GCC +# GCC started warning about operations unsupported by the TSan runtime. But +# KCSAN != TSan, so just ignore these warnings. +kcsan-cflags += -Wno-tsan +endif + ifndef CONFIG_KCSAN_WEAK_MEMORY kcsan-cflags += $(call cc-option,$(call cc-param,tsan-instrument-func-entry-exit=0)) endif
GCC 11 has introduced a new warning option, -Wtsan [1], to warn about unsupported operations in the TSan runtime. But KCSAN != TSan runtime, so none of the warnings apply. [1] https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Warning-Options.html Ignore the warnings. Currently the warning only fires in the test for __atomic_thread_fence(): kernel/kcsan/kcsan_test.c: In function ‘test_atomic_builtins’: kernel/kcsan/kcsan_test.c:1234:17: warning: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Wtsan] 1234 | __atomic_thread_fence(__ATOMIC_SEQ_CST); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ which exists to ensure the KCSAN runtime keeps supporting the builtin instrumentation. Signed-off-by: Marco Elver <elver@google.com> --- scripts/Makefile.kcsan | 6 ++++++ 1 file changed, 6 insertions(+)