Message ID | 20211130114433.2580590-20-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 19079C433FE for <linux-mm@archiver.kernel.org>; Tue, 30 Nov 2021 11:55:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9572A6B0093; Tue, 30 Nov 2021 06:46:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E0AE6B0095; Tue, 30 Nov 2021 06:46:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A6FC6B0096; Tue, 30 Nov 2021 06:46:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 6D69C6B0093 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 06:46:01 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 325538CA31 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 11:45:51 +0000 (UTC) X-FDA: 78865417302.08.76708FC Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) by imf12.hostedemail.com (Postfix) with ESMTP id B37B010000BF for <linux-mm@kvack.org>; Tue, 30 Nov 2021 11:45:50 +0000 (UTC) Received: by mail-wm1-f74.google.com with SMTP id 187-20020a1c02c4000000b003335872db8dso10297183wmc.2 for <linux-mm@kvack.org>; Tue, 30 Nov 2021 03:45:50 -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; bh=TQFyZU0v42DaaTkISoD0OFzde9Hlzhfr9CYPS/61CiQ=; b=UzkPOK44rKyoX0ydzg9d6O+jrGkdKn2U4Uh9I6GaB3gkQKhjEvJW6OswApZ/DpFhIs MjWkd+FkuLnMui5ECel20ebBFkuRLa1f1neQ6VVz1S7yCh0IvJGlwo8aeF9bhgAZqyug l2zCEvskzXpYTMvQpQGB0z4ARki5+15v+PWKTCRoN0cGTSZ65LPhGkDFa7K5dBSQtt1+ LiZoJY4ePdc7NQgpEjukKVvNVBinKAvWLDa3Mfnn9KnFectfd/m0Z+qn/ceEmQlEYCrQ OGNEtLuGhqXgJgSt12TdFVVE+Mz8qn5rbzRLOK/zD3ItiiBRgqjdDcz7tWKq+w3BIhpz +2gg== 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; bh=TQFyZU0v42DaaTkISoD0OFzde9Hlzhfr9CYPS/61CiQ=; b=DfTrAWzelETyhn8+E8pihcjyQinXgF5mMrwVZBiy8pIRnMjgbRNRbQ+Yqnx+CB7vfG XlzGhCx1gUKvUzOAzc3OAlTzsVXPS3rACVcC+VVMnxS5Y0g/XcKE3gFMtkMaQwKxP6T0 EVwJCcKX1QhA40DO1T8pDSUVzFbSlPPNMkVX648HdDubTSHZzm8sXDFEetOVrL4As1NN GVTsVTOMIM66a+AL3/FqLQxqvM1CFQx7URe8iCCYlmcs1AF/vIT4uYDQ6kc9OOd7tUU8 pDX4Euwogi9YUISFCXol5knsGtefsavswzCscP4S3edTw1XvQhJ6I5ZuZEtCXgG1ygLo wLNg== X-Gm-Message-State: AOAM533ClyfuRoZ94SyBmnwVhuOKsYZOBbUe5caIHpcempcx8SsFDtQw V9LhO7KHx5a9ERbDhGiECSfep8BVYw== X-Google-Smtp-Source: ABdhPJxb0DkHs7VvMvArdCvCQrK9MrDdf3hAA2QD7Q29GE02b72kjglRFvit2CdEhNhUNiK6zoXiTRV6/Q== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:86b7:11e9:7797:99f0]) (user=elver job=sendgmr) by 2002:a05:600c:19c8:: with SMTP id u8mr4203223wmq.155.1638272749477; Tue, 30 Nov 2021 03:45:49 -0800 (PST) Date: Tue, 30 Nov 2021 12:44:27 +0100 In-Reply-To: <20211130114433.2580590-1-elver@google.com> Message-Id: <20211130114433.2580590-20-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 19/25] x86/qspinlock, kcsan: Instrument barrier of pv_queued_spin_unlock() 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" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B37B010000BF X-Stat-Signature: rbap5w51ix8gojd3fz4hm1xe8ieziq1z Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=UzkPOK44; spf=pass (imf12.hostedemail.com: domain of 37Q6mYQUKCLYahranckkcha.Ykihejqt-iigrWYg.knc@flex--elver.bounces.google.com designates 209.85.128.74 as permitted sender) smtp.mailfrom=37Q6mYQUKCLYahranckkcha.Ykihejqt-iigrWYg.knc@flex--elver.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1638272750-214130 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/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h index d86ab942219c..d87451df480b 100644 --- a/arch/x86/include/asm/qspinlock.h +++ b/arch/x86/include/asm/qspinlock.h @@ -53,6 +53,7 @@ static inline void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val) static inline void queued_spin_unlock(struct qspinlock *lock) { + kcsan_release(); pv_queued_spin_unlock(lock); }
If CONFIG_PARAVIRT_SPINLOCKS=y, queued_spin_unlock() is implemented using pv_queued_spin_unlock() which is entirely inline asm based. As such, we do not receive any KCSAN barrier instrumentation via regular atomic operations. Add the missing KCSAN barrier instrumentation for the CONFIG_PARAVIRT_SPINLOCKS case. Signed-off-by: Marco Elver <elver@google.com> --- arch/x86/include/asm/qspinlock.h | 1 + 1 file changed, 1 insertion(+)