Message ID | 20221128094541.2645890-1-glider@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 78225C43217 for <linux-mm@archiver.kernel.org>; Mon, 28 Nov 2022 09:45:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E07F96B0072; Mon, 28 Nov 2022 04:45:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB7FD6B0073; Mon, 28 Nov 2022 04:45:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA7506B0074; Mon, 28 Nov 2022 04:45:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BB3E26B0072 for <linux-mm@kvack.org>; Mon, 28 Nov 2022 04:45:47 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 85179C0CB4 for <linux-mm@kvack.org>; Mon, 28 Nov 2022 09:45:47 +0000 (UTC) X-FDA: 80182369134.23.89178D4 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) by imf22.hostedemail.com (Postfix) with ESMTP id 06164C0008 for <linux-mm@kvack.org>; Mon, 28 Nov 2022 09:45:46 +0000 (UTC) Received: by mail-ed1-f73.google.com with SMTP id f17-20020a056402355100b00466481256f6so6276960edd.19 for <linux-mm@kvack.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=O8Oa5VHLOjxhd9BkgVN9X5V77sXiJ5eWY8bgdJj3liPsSz/DVhwKKp6EBj44JJ4WHx b97GHI9Q/T0dOuUr8IcznPr02zGBVwn5cdu+gCp76xWNEqVU2yOfBWwE+AylGn5jjKxs ZuwvKgYHDEfuR8/2sbon/syz+FMBl6zxfFoe8kcxKmunZZDoEEcnngIWW8zz640UANtf g6hSxb2VFW5cNXvfccN+ZF6oiCHZ4upBsV4/gbIn4F4XL1EbPegDlsFlWZUR/EGgCF/l QPellr9MyVm8U7AtwASVBAuWy6ypThXAVPV4Ef8gowI1xfp/gSOaSQLAtatcBvMvoFGz XzEw== X-Gm-Message-State: ANoB5pld9DpbdTp/gPn831GoEcsVpQe1eOgHJ33ARobCSjBPD9rV6GXG UX8bPdAmfzwQPIqHBzP8uvMFLZf/To0= X-Google-Smtp-Source: AA0mqf5JjgMUAXNrjyuEcpH5yC8Dqz2bfrGhmUj8weFzLuPbv1iNyji1PfDPUp5njvuDbzAg0khDIxsb0Ro= 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" ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=s6w1xbIf; spf=pass (imf22.hostedemail.com: domain of 3SYOEYwYKCIQotqlmzowwotm.kwutqv25-uus3iks.wzo@flex--glider.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3SYOEYwYKCIQotqlmzowwotm.kwutqv25-uus3iks.wzo@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669628747; a=rsa-sha256; cv=none; b=iTyhdL47saLJbt6McB9ukTDkFdUaAAjUxHt03uOJLFMnaTfj7rhu5k8YTbtYP9DI9QSah/ xtnwvkk0mfIj/sXHgJzH6/eXTdo1zaa8xQU1QJrCRLuTl3SxXHNhsCinWzj0tVVTq5JBis lmxossrgH7OMPDUFtDK2x+uPhElEmCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669628747; 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=rXoOet1Rb1vO+RV0XEBtCtgaydxMI/engJANIwuECRQ=; b=q9CnORG+lj/TmyEyTd/AOliULbNYR+r6zlKWurJBRbY/qHiovZfjjlgluDx/VT781zFjKw 1rJgdQfr2oLOHd1G40VYuxePdwXsaCHgKXiLjqzrn56UfSF6jUM1ZrJ54yQmdjPci3rDVn BukFheJovQGMq+1mwEkUYYcvBx984K0= X-Rspamd-Queue-Id: 06164C0008 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=s6w1xbIf; spf=pass (imf22.hostedemail.com: domain of 3SYOEYwYKCIQotqlmzowwotm.kwutqv25-uus3iks.wzo@flex--glider.bounces.google.com designates 209.85.208.73 as permitted sender) smtp.mailfrom=3SYOEYwYKCIQotqlmzowwotm.kwutqv25-uus3iks.wzo@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam02 X-Stat-Signature: ffrb5faii59zn3bjjuqmcrnxz436axb5 X-HE-Tag: 1669628746-97548 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 |
[1/2] lockdep: allow instrumenting lockdep.c with KMSAN
|
expand
|
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)
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(-)