Message ID | 20200907134055.2878499-9-elver@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=rv5h=CQ=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 31E64618 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 7 Sep 2020 13:44:02 +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 F383B21481 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 7 Sep 2020 13:44:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="htMPasMl"; 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 F383B21481 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=X67ywlyxZK6d5gxt2ArmK1OS3nO0OiHwiXVaRhAAAno=; b=htMPasMli9lL2VwtVyz9LX1TR wSrDkzpJyk/m/Ux0vbDNrggoYk72Kx506QnaSxDhta5OLPzAOpJd7JtMdTFyUqpeComtUStZxBvir Z2idVYt876nnwCDbBXVG4p2ElEEfD9Rl36jUO4CaSg4eWnGUVapgoe9NiROuOLsVntjNtztRC+BA8 w6FcN8SJ6ux13pac5WDuUiZIU1/ovU5IuWCAP149JBO6xq6LdPM3qmYMqSaU/fup8BQF3ddCdm9ci EmlqBouLo3KwKEOM75odY4vj5IQ4KrtnP9N4fPrmoyzlxHClB4t1pyu+8qsUA+hmS9YSZwXg2npve Ts6WBA5RA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFHPf-0003xJ-23; Mon, 07 Sep 2020 13:42:27 +0000 Received: from mail-wr1-x449.google.com ([2a00:1450:4864:20::449]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFHOm-0003dK-FI for linux-arm-kernel@lists.infradead.org; Mon, 07 Sep 2020 13:41:43 +0000 Received: by mail-wr1-x449.google.com with SMTP id o6so5580992wrp.1 for <linux-arm-kernel@lists.infradead.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=f87cJTI3kDfMnIOaibXV1oVDwUmA8aRNv3sbqJPryyL4Qm+r/yx+1GWuAhRaYcxiWX 9hVlr3Nlo1wwxDMH5AqJIhoXjlF3j9snrN9gbJ6WZepsn0+i7ykRjY75/Z+ORxoCFmA4 Yr9kGkN4g26NXtr96tbK708mGZB/OBi2P+6gMSD2Ecdn0Det82AeYR1tknmFlrzOKLSY 3kqABEUnnjL+68iseJ0d/vf72qYFUHfRW+IhAwyqbKzq1/rwXK7n7fIZpabkAVF+wURL EYF+2+lqzde9WnmF44/Qsf+5jK+fTUG/IxJyeGZ4yOgFTkV2V51P7nEgw4g1kB2gR5iT Kw0g== X-Gm-Message-State: AOAM533afjQ+hrXROukTDtWR99hyQrwPb27vYG52P7atVmZJLp5FTagc DHoEP2XN863UDaE9s1xsqZC74kLvYg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200907_094132_575628_B553C7B8 X-CRM114-Status: GOOD ( 13.76 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:449 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium 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: linux-doc@vger.kernel.org, peterz@infradead.org, dave.hansen@linux.intel.com, linux-mm@kvack.org, edumazet@google.com, hpa@zytor.com, will@kernel.org, corbet@lwn.net, x86@kernel.org, kasan-dev@googlegroups.com, mingo@redhat.com, linux-arm-kernel@lists.infradead.org, aryabinin@virtuozzo.com, keescook@chromium.org, paulmck@kernel.org, jannh@google.com, andreyknvl@google.com, cai@lca.pw, luto@kernel.org, tglx@linutronix.de, dvyukov@google.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, bp@alien8.de 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? */