Message ID | 20221128094541.2645890-1-glider@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5546327wrr; Mon, 28 Nov 2022 01:55:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf40/uAnQL68IWXG6DuhMdmLsjf09eq1p9Hsoo273DU6k6Lmmb4VFy1J75OVWWf5SvrpwDTi X-Received: by 2002:a17:903:230b:b0:189:6cb1:a65e with SMTP id d11-20020a170903230b00b001896cb1a65emr13655366plh.125.1669629350832; Mon, 28 Nov 2022 01:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669629350; cv=none; d=google.com; s=arc-20160816; b=nuPitfDX9gCiHU1hwTejjFDOFDSvD1okjmIhHfEHxsYKQ/iPlnC7f9tdFjJESsGaFY fSZm7U+/Bmbjq3dNaTV7S68wXCFVLN1/qMZBQaG9RZF+/E6SdN0NXzuwxHdirLO15mAD FHfkqXo+vXmaDVdnAlICe5xyaevDyhfiT5iYOs+dcXu8sMcKgkGqgHSXOhitlvM36JuG SJRrKvnzdqwlKA9fYt7bFmsvcZicTQDMjsuz1qP4EOT/xfoi/gBIzCY1LrmyukOhsCri j04mp/8fm4xjk0KrG2QeRkXCJBdgL/bvEYro0LWCnPxJ56rf/gMHj3gwhOUJva6mHzda Qong== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=rXoOet1Rb1vO+RV0XEBtCtgaydxMI/engJANIwuECRQ=; b=i6lWHiaBRckCio/GSHWI+QgMDKEcY2VmrZnJbF2sWdZRKc8y3gWTERag1WZQPZXO9E t24i+TLjZv2anmM1LFn5O7STEmr5wgA7QBXsflI0jz5i2132LqNsUivvS2QFTKLMkXE6 qfVEY4hhPRL9IaU7QKf7+6hi9s2oDexFs9NTTVlHmS3vXux2rzwzHpvZ5yQgnSt/1N4I j/1/EPqBJk0V/4Cj9i2R4iCA1XTUIlrELiMDqWCHtVFu3oGtIAULcinW2gDEKw5G6Gmh /DHyGets2rDf4IBeumBrcb7T9ly1phHJlvcnHkDCtpTRDGvoqVSOz0ydaSSjYTDHQraI uqNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s6w1xbIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t23-20020a170902b21700b00186f1ccf36bsi10662513plr.45.2022.11.28.01.55.38; Mon, 28 Nov 2022 01:55:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=s6w1xbIf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229910AbiK1Jp6 (ORCPT <rfc822;gah0developer@gmail.com> + 99 others); Mon, 28 Nov 2022 04:45:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbiK1Jpr (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 Nov 2022 04:45:47 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F8319296 for <linux-kernel@vger.kernel.org>; Mon, 28 Nov 2022 01:45:47 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id z3-20020a056402274300b0046b14f99390so1925066edd.9 for <linux-kernel@vger.kernel.org>; Mon, 28 Nov 2022 01:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=rXoOet1Rb1vO+RV0XEBtCtgaydxMI/engJANIwuECRQ=; b=s6w1xbIf2vlYUmSknr7oRraUB85nf4lYbLpqHtE7R/uCCqK/YnX+XJ9uS2gmJ6EfSy WC3rIcgYxlJav7Y0J/sxRNoZa4e7zOpW5Pab30yV6YSdxovSZhHEQa+NVRLP8hkETK4O 6xWCrhsjeg4dEgQ2Uyr/UbXf2G5Ql3Tvr+GtnFm8cARQJPnSKqhRpB68cZ0zzU6hYpMI TDcudtbdB+cg27Z0lGhN4n88RSV9kqLIMMgDW5leYNMZG4GEDv1J/ZlQuk/hm3AAZjfE UYGRAKSaGz2kKfqLvXtVQaNO+vPQS76GptQqpktijCNM6SDr2GTU81PuaYL3NZ69Igxe O1iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rXoOet1Rb1vO+RV0XEBtCtgaydxMI/engJANIwuECRQ=; b=am05efrPv3mArzrHxVyGnRUIcvwhWDLMqGpAQiGcX+yYJBpCtWp0fdHGD80sgZy53F 65BLxQ3WiVM0BWjiSpg+MQCvaQzACBwzFuU+che/ewqDfBQoaBCNE0D1ZILlIQUcRrpO HjLpFAQPabnZ7J2RJU/TARYPNyVXoqUZn3xQAKIiTelmXThWuM1+pvx93VHit4WxjU3E ikeq68INdUrpU4PkaA6ZUdkfzboQ6DMrkiCVXPeUGIGrNowYhuM7VgHkbcMbK8Bq/q8c U5jcw7YoV/57spVXoUP8vOs4C6mjgoJzYtnhYBhRbVA5fd06uvIuXaoZ4H8lHCPj4ya0 D3KQ== X-Gm-Message-State: ANoB5pmywXftS73WMC6d+ef1Zx8cqTlFXxjk5dgTcmlmxdEo1/XHIdom +9JnGXTia2s3x4RiWKt4dhEgtF6itiQ= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:dc07:26e3:1eb7:b279]) (user=glider job=sendgmr) by 2002:aa7:de08:0:b0:46a:e4e0:8407 with SMTP id h8-20020aa7de08000000b0046ae4e08407mr10060697edv.36.1669628745543; Mon, 28 Nov 2022 01:45:45 -0800 (PST) Date: Mon, 28 Nov 2022 10:45:40 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog Message-ID: <20221128094541.2645890-1-glider@google.com> Subject: [PATCH 1/2] lockdep: allow instrumenting lockdep.c with KMSAN From: Alexander Potapenko <glider@google.com> To: glider@google.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, peterz@infradead.org, mingo@redhat.com, will@kernel.org, elver@google.com, dvyukov@google.com, linux-mm@kvack.org, kasan-dev@googlegroups.com, Eric Biggers <ebiggers@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750733265969903251?= X-GMAIL-MSGID: =?utf-8?q?1750733265969903251?= |
Series |
[1/2] lockdep: allow instrumenting lockdep.c with KMSAN
|
|
Commit Message
Alexander Potapenko
Nov. 28, 2022, 9:45 a.m. UTC
Lockdep and KMSAN used to play badly together, causing deadlocks when
KMSAN instrumentation of lockdep.c called lockdep functions recursively.
Looks like this is no more the case, and a kernel can run (yet slower)
with both KMSAN and lockdep enabled.
This patch should fix false positives on wq_head->lock->dep_map, which
KMSAN used to consider uninitialized because of lockdep.c not being
instrumented.
Link: https://lore.kernel.org/lkml/Y3b9AAEKp2Vr3e6O@sol.localdomain/
Reported-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Alexander Potapenko <glider@google.com>
---
kernel/locking/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/locking/Makefile b/kernel/locking/Makefile index ea925731fa40f..0db4093d17b8a 100644 --- a/kernel/locking/Makefile +++ b/kernel/locking/Makefile @@ -7,7 +7,6 @@ obj-y += mutex.o semaphore.o rwsem.o percpu-rwsem.o # Avoid recursion lockdep -> sanitizer -> ... -> lockdep. KCSAN_SANITIZE_lockdep.o := n -KMSAN_SANITIZE_lockdep.o := n ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE)