Message ID | 20200929133814.2834621-9-elver@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=t1R8=DG=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B81CD1668 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 29 Sep 2020 13:41:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F332207C4 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 29 Sep 2020 13:41:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HiUnXofh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="UOSBvRZB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F332207C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WWO3CkYcWrsindtrfMFxSYt6qp0Ihrzt21Sg8W8aBtA=; b=HiUnXofhyMfZEm+vCD/LWPXOY H8GjRBWJp+d/ax+CyKL/SH7PxY+KTUkRWFwcH7zvx0fWbE6VTn6YYA4Pd7lqcIU6qifJ4AAvw7dO5 3/z5W3meeRwYzI5woOEkQITiWhrNMtyI7GJdSCXtmuHJRu+hh+Y52+yyT7mkNTSTb8Ik0WMxM+QUl ApgqrErCHbDXZScJoy2dWXu3zmWaAboOQvZcYLS7tSavrLyw4Q3OLRCtgAYGbdUlUjxPl9RCcqDCG EyqGMvQ9QxgdxZJq7IFHx1EvNxPj99YC+FWSZg971+TiGbvujThw3MFHOxoi647q5gFQZx1cwsxHL z+r7hEEYA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNFrk-0003II-0w; Tue, 29 Sep 2020 13:40:24 +0000 Received: from mail-qk1-x749.google.com ([2607:f8b0:4864:20::749]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNFqT-0002p0-Qq for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2020 13:39:25 +0000 Received: by mail-qk1-x749.google.com with SMTP id 125so2686296qkh.4 for <linux-arm-kernel@lists.infradead.org>; Tue, 29 Sep 2020 06:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=vVOlNt/WCejDp1JOCEsvSSdVHILjJnc43Mcb0PKSl94=; b=UOSBvRZBZKrpnksJMXA3OOhNYA+IsYKy4qy9MiaMAWv4Qmco6I0lGG/1E1y4vY58vz CZBn6KJFIpSQPzI+0qHZF+n9AKpdnR1c/FcXU2vi9d6AcLaxN+0h2+6lKxpJ+VwD/Fb0 l3hIQBgDmYX4Qqem9eqXPEynllsNkpk/ipyQ/c4kOJwGgN0Mahu/+1w7p7blTpkFPPDH eBthRpEWp+J41zyd12Z9gm0BLrS+hsDfGa9rRHXKGig2x9ktsb/VO1/Z+5uzlxgK3Imv TxFCLtBlLbW0IQrbRuWQz26NF7uEVM4FpTthHS8NRQsg6B3mcVsX1dkd9vbBMEbwjd3+ Bw5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=vVOlNt/WCejDp1JOCEsvSSdVHILjJnc43Mcb0PKSl94=; b=r9wDr3Eg9HaBgoV/+vS+HWFJgoxyFm4O/w5rCtdjj7V+i5LOWT8cilt5DL2zvJ4TuG R7sHiUVVK2vFBlNgWBsGiFdGh8nbqbcSGDd265uunMDE8yfd2DcG/ihXfia46RqIHznt q8Rt3PFK2ea0UVSUBTJzwNsxgiu7lkQluRmky7TlyfNU/4kaNNrmrxdRLw6DagRiYuAV RHJZ4Q/iBbbT2oI6fxvvJZRwV8DNCN8p76IIfnW6pgNoXxUBvMKMlNpKTwxcSmW5zuZI H69jDofzdJDo/N8t4q9MMJBlBKHa7NsO+CQAv1WEsTSLThQ6rfA3ficNbPQZYM3xwB7D WrqA== X-Gm-Message-State: AOAM530Ita3bnAtA4FhVTxTpmQMnY8am8WRoy0g37mgQxDc/JzFiYKXX eFMWpFSJrfc1p8cdWyLW0WeNaKEo3g== X-Google-Smtp-Source: ABdhPJxPHumSkQ+1sRW54lJFlDtPVwTgrVQLDVfUTBhLd4jdPTbPDJavbzzqCAAj2yGSJ8AXrL9sZ4EW2w== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:f693:9fff:fef4:2449]) (user=elver job=sendgmr) by 2002:a0c:f6c4:: with SMTP id d4mr4373033qvo.41.1601386741788; Tue, 29 Sep 2020 06:39:01 -0700 (PDT) Date: Tue, 29 Sep 2020 15:38:11 +0200 In-Reply-To: <20200929133814.2834621-1-elver@google.com> Message-Id: <20200929133814.2834621-9-elver@google.com> Mime-Version: 1.0 References: <20200929133814.2834621-1-elver@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [PATCH v4 08/11] kfence, lockdep: make KFENCE compatible with lockdep From: Marco Elver <elver@google.com> To: elver@google.com, akpm@linux-foundation.org, glider@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200929_093905_919103_5FEA2FE9 X-CRM114-Status: GOOD ( 13.31 ) X-Spam-Score: -8.2 (--------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-8.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:749 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.5 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, hdanton@sina.com, linux-doc@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, linux-mm@kvack.org, edumazet@google.com, hpa@zytor.com, cl@linux.com, will@kernel.org, sjpark@amazon.com, corbet@lwn.net, x86@kernel.org, kasan-dev@googlegroups.com, mingo@redhat.com, vbabka@suse.cz, rientjes@google.com, aryabinin@virtuozzo.com, keescook@chromium.org, paulmck@kernel.org, jannh@google.com, andreyknvl@google.com, bp@alien8.de, luto@kernel.org, Jonathan.Cameron@huawei.com, tglx@linutronix.de, dvyukov@google.com, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, penberg@kernel.org, iamjoonsoo.kim@lge.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
KFENCE: A low-overhead sampling-based memory safety error detector
|
expand
|
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 54b74fabf40c..0cf5d5ecbd31 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -38,6 +38,7 @@ #include <linux/seq_file.h> #include <linux/spinlock.h> #include <linux/kallsyms.h> +#include <linux/kfence.h> #include <linux/interrupt.h> #include <linux/stacktrace.h> #include <linux/debug_locks.h> @@ -755,6 +756,13 @@ static int static_obj(const void *obj) if (arch_is_kernel_initmem_freed(addr)) return 0; + /* + * KFENCE objects may be allocated from a static memory pool, but are + * not actually static objects. + */ + if (is_kfence_address(obj)) + return 0; + /* * static variable? */