Message ID | 20200907134055.2878499-9-elver@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=EXQ6=CQ=kvack.org=owner-linux-mm@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 C19E4618 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 7 Sep 2020 13:41:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 87F9C21481 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 7 Sep 2020 13:41:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="s4MbRGJa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87F9C21481 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C13D48E0009; Mon, 7 Sep 2020 09:41:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BC3BA8E0001; Mon, 7 Sep 2020 09:41:31 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3CEA8E0009; Mon, 7 Sep 2020 09:41:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 80B8C8E0001 for <linux-mm@kvack.org>; Mon, 7 Sep 2020 09:41:31 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 44308180AD81D for <linux-mm@kvack.org>; Mon, 7 Sep 2020 13:41:31 +0000 (UTC) X-FDA: 77236377582.06.note89_371666c270cc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 1DF5E10040F21 for <linux-mm@kvack.org>; Mon, 7 Sep 2020 13:41:31 +0000 (UTC) X-Spam-Summary: 1,0,0,b96701e92860752a,d41d8cd98f00b204,3ithwxwukcfq07h0d2aa270.ya8749gj-886hwy6.ad2@flex--elver.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:966:973:988:989:1260:1277:1313:1314:1345:1359:1437:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2904:3138:3139:3140:3141:3142:3152:3352:3870:3871:3872:3874:3876:4250:4321:4385:5007:6120:6261:6653:6742:6743:7901:9969:10004:10400:11026:11473:11658:11914:12043:12048:12297:12438:12555:12895:13069:13161:13229:13311:13357:13972:14096:14097:14181:14394:14659:14721:21080:21444:21451:21627:21990:30054:30076:30090,0,RBL:209.85.128.73:@flex--elver.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04y8tdrayz4z7xqgkpt5rqciqm4pmycdu6wt1w9693m31zchib3gofpkybf4c45.nogqdj5xcswhcoyxy1soiud1p8io8knwerjcuts3cimow3f7nou9jd4zeqfkq4r.c-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custo m_rules: X-HE-Tag: note89_371666c270cc X-Filterd-Recvd-Size: 4738 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) by imf29.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 7 Sep 2020 13:41:30 +0000 (UTC) Received: by mail-wm1-f73.google.com with SMTP id c198so3981856wme.5 for <linux-mm@kvack.org>; Mon, 07 Sep 2020 06:41:30 -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=QC9NTo7nxtZYJpQO/i/DXWRBIzGZiJeRrgmmIrmcLsY=; b=s4MbRGJaHgZspQUWINVYJ4pv8oUtjLjvmGIgxMKTQ5dpZP+CTosv0PbYmzzxxGGXV1 lu//CLYOxuze23vL1Bsidfemp47rjnE9diiVDGA8zX6qY7htd9eYMagMAyg+h08jG0Of 2+B5S4bbYrx0Z+7QhYZpW1sYioo4B4NxC0mipIVfVaGUKBPBaaVG8jiHoIJ0FFzS2VmY abMTL8QLr3mcS0n8SK1Y6ohWVxow8eGg9rJ3VpEmH5/fbCLItYW8VkWRtMRorA/nE0NY 8z30jLgXskcLoNjNbRF5RWlrDlZjgSCM2YaL1KafEg8a9O1f/ASIE+LMY5azSFzU/NJo KtFQ== 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=QC9NTo7nxtZYJpQO/i/DXWRBIzGZiJeRrgmmIrmcLsY=; b=QFG9l+rV1dC65GtX1R67npkRMiA43Be7/uSg0S4iRzy2JbK3ta7X54d91bjBmOLjtV Ac9Iuuy9WKsZYCoVSnbvMByirsVOMNRH5K9tOr6ozXUA0zMiz+bIX0NIyQFKbOw6S7mG qi9/trV1gdqbbrd2mn9x9NLCuch8Qf736+L50tKpniFR9pzxUTVJBXVEUvnLXQi5aeuo VtDR82flKgl+ypQUJ8ZNqOLbLgBc3vGX8aKA/9dgM+0mDmCJfulfPlsIUOxmkAZ0XJrQ H2qwOrkIcq4uHAgwlMXEUKZVKPrWviTaYfJCZnrqvMa+zVgpGj5U/eBLf8N3EZP0+qRu hYhQ== X-Gm-Message-State: AOAM533xeCxENKDwGnxk4wroEiNEsBotIXSNiVbcY0qnSaoU+GFxBJFV khOtg6vzCNjBmfxWRB6uONOg02z2zw== X-Google-Smtp-Source: ABdhPJwfBXSFasOjomiIxo9IXspK1cNnb4LrYot1/kxO1J7dSMNEmNNlULqP5o8LlWMBrqdqJrkBo5GUVQ== X-Received: from elver.muc.corp.google.com ([2a00:79e0:15:13:f693:9fff:fef4:2449]) (user=elver job=sendgmr) by 2002:a5d:6551:: with SMTP id z17mr20816665wrv.200.1599486089420; Mon, 07 Sep 2020 06:41:29 -0700 (PDT) Date: Mon, 7 Sep 2020 15:40:53 +0200 In-Reply-To: <20200907134055.2878499-1-elver@google.com> Message-Id: <20200907134055.2878499-9-elver@google.com> Mime-Version: 1.0 References: <20200907134055.2878499-1-elver@google.com> X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog Subject: [PATCH RFC 08/10] kfence, lockdep: make KFENCE compatible with lockdep From: Marco Elver <elver@google.com> To: elver@google.com, glider@google.com, akpm@linux-foundation.org, catalin.marinas@arm.com, cl@linux.com, rientjes@google.com, iamjoonsoo.kim@lge.com, mark.rutland@arm.com, penberg@kernel.org Cc: hpa@zytor.com, paulmck@kernel.org, andreyknvl@google.com, aryabinin@virtuozzo.com, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, dvyukov@google.com, edumazet@google.com, gregkh@linuxfoundation.org, mingo@redhat.com, jannh@google.com, corbet@lwn.net, keescook@chromium.org, peterz@infradead.org, cai@lca.pw, tglx@linutronix.de, will@kernel.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 1DF5E10040F21 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 |
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? */