From nobody Mon Feb 9 06:33:02 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90B73C41513 for ; Sat, 22 Jul 2023 23:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjGVXPW (ORCPT ); Sat, 22 Jul 2023 19:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjGVXPT (ORCPT ); Sat, 22 Jul 2023 19:15:19 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 510FA171E for ; Sat, 22 Jul 2023 16:15:16 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-765942d497fso290114285a.1 for ; Sat, 22 Jul 2023 16:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1690067715; x=1690672515; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Dz1WtFDUN503GFfPrb86//foDSemE6Fx12xrK89H/vw=; b=bY/thvLcgkc1kW1AiaCtDdgCl0GfMZRm3ZXHre3bwwItwa2QFP+rNHHQro/QmoOQff SI+ax91vPJVjZuEexwJ+NcNiJvh4ZD341RywPTp5zViX/QpyMlKvE3BatWDge2b9aXYf XRzErIo70NKB3/0lov6evFqbdQDftwlrF7WGfTt7v1ErLh86yDMTI1f/NmNREfl6eeu9 JT2qhvs7omUMVpT19OxD5mhUoM7yVse9sNIt+segHAFkLEZSDmqFDZIBfzvQJAbRxmEO dHiDwjGBelZXtngdm3adx169KFbtYBzX1XRUx1NX2rbo7fGIjG9wank6BOnumMU7frS0 bjlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690067715; x=1690672515; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dz1WtFDUN503GFfPrb86//foDSemE6Fx12xrK89H/vw=; b=GuZELCji62BoaD+pivhe9uULynUWnNT03GVGTCOZKM1cOcu3dZQMryAq8bJ/nBBvFI tiqZFIF1jCt6i4Qsz0TejX91eb7baFnOrJ6qi60cXsoXlGTiS1cF/LqoMLpCIUfOEKVD FzCM2WgQxXEb8s2we95Ai0//8nMR623iPfqXQxOBl6HqxImw3us1XQxYLu5BA4LUUng/ 0zeElVwg86kRhCDJT2fZThQta4ZADUwC2xXQUbbmda6EN7PNL0G5otwgyl6bPp7Uv+ti AN1tnwGjItrkNIiDnLYL0rNVihpEhcwwcTGe4zg0zkJJ1p4q0fh3wXZyx6DBLKVIgY// 2T0Q== X-Gm-Message-State: ABy/qLYf40g8dqJBd+LHIHbzQOcy1PKnsGAr/q38T5RjITS9w63/Etlr vYwP/RIrylzzlHS5TEAKBHBARBb901N3MN4jLjc= X-Google-Smtp-Source: APBJJlHl+ww4l/5L3aVaKf+nyHJSNfnHmrmG6yrGFh/lnSNpYxDd9Cn/A23HI9OTbXjjHyktI1V6bQ== X-Received: by 2002:a05:620a:158f:b0:767:e27d:99fe with SMTP id d15-20020a05620a158f00b00767e27d99femr3915518qkk.29.1690067715304; Sat, 22 Jul 2023 16:15:15 -0700 (PDT) Received: from soleen.c.googlers.com.com (193.132.150.34.bc.googleusercontent.com. [34.150.132.193]) by smtp.gmail.com with ESMTPSA id u21-20020ae9c015000000b007675c4b530fsm2075957qkk.28.2023.07.22.16.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jul 2023 16:15:14 -0700 (PDT) From: Pasha Tatashin To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, rick.p.edgecombe@intel.com Subject: [PATCH v2 1/3] mm/page_table_check: Do WARN_ON instead of BUG_ON Date: Sat, 22 Jul 2023 23:15:06 +0000 Message-ID: <20230722231508.1030269-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230722231508.1030269-1-pasha.tatashin@soleen.com> References: <20230722231508.1030269-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Currently, page_table_check when detects errors panics the kernel. Instead, print a warning as it is more useful compared to unconditionally crashing the machine. However, once a warning is detected, the counting of page_table_check becomes unbalanced, therefore, disable its activity until the next boot. In case of where machine hardening requires a more secure environment, it is still possible to crash machine on page_table_check errors via panic_on_warn sysctl option. Signed-off-by: Pasha Tatashin --- mm/page_table_check.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 93ec7690a0d8..ad4447e999f8 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -22,6 +22,12 @@ static bool __page_table_check_enabled __initdata =3D DEFINE_STATIC_KEY_TRUE(page_table_check_disabled); EXPORT_SYMBOL(page_table_check_disabled); =20 +#define PAGE_TABLE_CHECK_WARN(v) \ + do { \ + if (WARN_ON_ONCE(v)) \ + static_branch_enable(&page_table_check_disabled); \ + } while (false) + static int __init early_page_table_check_param(char *buf) { return kstrtobool(buf, &__page_table_check_enabled); @@ -50,7 +56,8 @@ struct page_ext_operations page_table_check_ops =3D { =20 static struct page_table_check *get_page_table_check(struct page_ext *page= _ext) { - BUG_ON(!page_ext); + PAGE_TABLE_CHECK_WARN(!page_ext); + return (void *)(page_ext) + page_table_check_ops.offset; } =20 @@ -72,18 +79,18 @@ static void page_table_check_clear(struct mm_struct *mm= , unsigned long addr, page =3D pfn_to_page(pfn); page_ext =3D page_ext_get(page); =20 - BUG_ON(PageSlab(page)); + PAGE_TABLE_CHECK_WARN(PageSlab(page)); anon =3D PageAnon(page); =20 for (i =3D 0; i < pgcnt; i++) { struct page_table_check *ptc =3D get_page_table_check(page_ext); =20 if (anon) { - BUG_ON(atomic_read(&ptc->file_map_count)); - BUG_ON(atomic_dec_return(&ptc->anon_map_count) < 0); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->file_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_dec_return(&ptc->anon_map_count) < 0); } else { - BUG_ON(atomic_read(&ptc->anon_map_count)); - BUG_ON(atomic_dec_return(&ptc->file_map_count) < 0); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->anon_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_dec_return(&ptc->file_map_count) < 0); } page_ext =3D page_ext_next(page_ext); } @@ -110,18 +117,18 @@ static void page_table_check_set(struct mm_struct *mm= , unsigned long addr, page =3D pfn_to_page(pfn); page_ext =3D page_ext_get(page); =20 - BUG_ON(PageSlab(page)); + PAGE_TABLE_CHECK_WARN(PageSlab(page)); anon =3D PageAnon(page); =20 for (i =3D 0; i < pgcnt; i++) { struct page_table_check *ptc =3D get_page_table_check(page_ext); =20 if (anon) { - BUG_ON(atomic_read(&ptc->file_map_count)); - BUG_ON(atomic_inc_return(&ptc->anon_map_count) > 1 && rw); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->file_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_inc_return(&ptc->anon_map_count) > 1 && rw= ); } else { - BUG_ON(atomic_read(&ptc->anon_map_count)); - BUG_ON(atomic_inc_return(&ptc->file_map_count) < 0); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->anon_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_inc_return(&ptc->file_map_count) < 0); } page_ext =3D page_ext_next(page_ext); } @@ -137,15 +144,15 @@ void __page_table_check_zero(struct page *page, unsig= ned int order) struct page_ext *page_ext; unsigned long i; =20 - BUG_ON(PageSlab(page)); + PAGE_TABLE_CHECK_WARN(PageSlab(page)); =20 page_ext =3D page_ext_get(page); - BUG_ON(!page_ext); + PAGE_TABLE_CHECK_WARN(!page_ext); for (i =3D 0; i < (1ul << order); i++) { struct page_table_check *ptc =3D get_page_table_check(page_ext); =20 - BUG_ON(atomic_read(&ptc->anon_map_count)); - BUG_ON(atomic_read(&ptc->file_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->anon_map_count)); + PAGE_TABLE_CHECK_WARN(atomic_read(&ptc->file_map_count)); page_ext =3D page_ext_next(page_ext); } page_ext_put(page_ext); --=20 2.41.0.487.g6d72f3e995-goog From nobody Mon Feb 9 06:33:02 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB7E9C001DE for ; Sat, 22 Jul 2023 23:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjGVXPZ (ORCPT ); Sat, 22 Jul 2023 19:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjGVXPU (ORCPT ); Sat, 22 Jul 2023 19:15:20 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71401FCB for ; Sat, 22 Jul 2023 16:15:16 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-63cf40716ffso4257616d6.2 for ; Sat, 22 Jul 2023 16:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1690067716; x=1690672516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=AN03s9OeFU4xgplmqM3lIZ6LlOvPnGJDa4y5aw2r6PE=; b=GEwr0q4z/KJrBbjpH9m4mksCYYGzhmQBkldWwvlrkzZPNUFMo+33zYjKWn236Rz5Jh mNrrcz1WM/1Zm1p4HZjzbp2iOD9Y5Thnv6+TJ4aBxLzCWX9PTygswuQC8+LqS2O5UYva zr3rAoGqN/oYoVNT6hMhFhQCZXGMeXDs3m3dALlQzfV5RH0/CbpIDYZ9GLKnBfbJeNrA fUkGhNpwdYXj8QTjTKXHA8gCo10j3oZij5KaRCcRWldrqMIvfZjg/UXbGDHeJUE/BZk9 3Wus6jWqwnVJyxWj53YeX8o6cUJ+8Ed98IR/js9MS6gJHzN9MVBtaCE912d72lqlkRm2 duUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690067716; x=1690672516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AN03s9OeFU4xgplmqM3lIZ6LlOvPnGJDa4y5aw2r6PE=; b=k8l+cT8hgIt30QzcxjdKyvAzfJNpWtx4Il2yb66zLe+AXya06dofP3xYskXO9QJWTy mqphkyOsS4q6UUtvYI/siLnpazgcBNB5VLi38XArb2eXl91kYV+si7KYyqwGbjoVxi04 i8vJ9u68OH/CuD9pROTRq74BpLCjDhEUNuugByhQHPKPjjtlG2UN6WS3MWYIt2cl52yc 2uNElDEERWPoUUCs4XOGFAADxZ+N1+mtNR/Qoz+pMMtH2dwbqzqXwdTUoCHdLFRzEnDe eRt+edirZjWy7MncQm8046+e8WOl1NpJjRrpwQNdnBrR7/inBZp0f2XvJCkwIskzxciT 1nPw== X-Gm-Message-State: ABy/qLZKRo7HkWC6PxIf8f3k1zPfoDCo/JvFPSvIwwhwnf+9ScnmPJrB 9zfj31REtUTwM0pQ8Fz4qs1aAg== X-Google-Smtp-Source: APBJJlFgPvVh9jusGtl/aMb2jHxgpWDCI2Ta53l5JgMLT6qMwivZP9ZENOy3ByIlqRkIvorgLDUVUQ== X-Received: by 2002:a0c:e049:0:b0:632:80f:4728 with SMTP id y9-20020a0ce049000000b00632080f4728mr3778989qvk.27.1690067715976; Sat, 22 Jul 2023 16:15:15 -0700 (PDT) Received: from soleen.c.googlers.com.com (193.132.150.34.bc.googleusercontent.com. [34.150.132.193]) by smtp.gmail.com with ESMTPSA id u21-20020ae9c015000000b007675c4b530fsm2075957qkk.28.2023.07.22.16.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jul 2023 16:15:15 -0700 (PDT) From: Pasha Tatashin To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, rick.p.edgecombe@intel.com Subject: [PATCH v2 2/3] doc/vm: add information about page_table_check warn_on behavior Date: Sat, 22 Jul 2023 23:15:07 +0000 Message-ID: <20230722231508.1030269-3-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230722231508.1030269-1-pasha.tatashin@soleen.com> References: <20230722231508.1030269-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The default behavior of page table check was changed from panicking kernel to printing a warning. Add a note how to still panic the kernel when error is detected. Signed-off-by: Pasha Tatashin --- Documentation/mm/page_table_check.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/mm/page_table_check.rst b/Documentation/mm/page_= table_check.rst index c12838ce6b8d..f534c80ee9c9 100644 --- a/Documentation/mm/page_table_check.rst +++ b/Documentation/mm/page_table_check.rst @@ -14,13 +14,14 @@ Page table check performs extra verifications at the ti= me when new pages become accessible from the userspace by getting their page table entries (PTEs PM= Ds etc.) added into the table. =20 -In case of detected corruption, the kernel is crashed. There is a small +In case of detected corruption, a warning is printed. There is a small performance and memory overhead associated with the page table check. Ther= efore, it is disabled by default, but can be optionally enabled on systems where = the extra hardening outweighs the performance costs. Also, because page table = check is synchronous, it can help with debugging double map memory corruption is= sues, by crashing kernel at the time wrong mapping occurs instead of later which= is -often the case with memory corruptions bugs. +often the case with memory corruptions bugs. In order to crash kernel sysc= tl +panic_on_warn should be set to 1. =20 Double mapping detection logic =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D --=20 2.41.0.487.g6d72f3e995-goog From nobody Mon Feb 9 06:33:02 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC415C0015E for ; Sat, 22 Jul 2023 23:15:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjGVXP1 (ORCPT ); Sat, 22 Jul 2023 19:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjGVXPU (ORCPT ); Sat, 22 Jul 2023 19:15:20 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 926641708 for ; Sat, 22 Jul 2023 16:15:17 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-76ad842d12fso245745785a.3 for ; Sat, 22 Jul 2023 16:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1690067716; x=1690672516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jqX+omN+4AV/jEW9gJWFZdBmlFQeDD8EFviSI3KwL+8=; b=h4VGOvKMgez+/NKOawppSiHt7934PF71iQ7qv8jvSgyoGVHQdeSp1JgcRIsn2D88hx g2qwPAuZJScjWF75Ou+qLGKjKOMoBD6KgtLtf0HDYfqszmZ+yCoggVBesEXvtWMjVL8g JpUjuA4gJbUNFr73GuH0FlWZrgf5yI6+x2LMQdtPiA8g0Av/6cdf1+CYfjPWtybKpcP9 eVd7uPFytoOlTw5R5xKtG9M76QYaPDi/SS5XihMN3binOTlJbuopN24pguAFSUKmGTZV KDBH4hbi0ALobtUZ6mlYQTvapei1p+n2u+rufzxhHrLS/TA6KLItQHUFRHlM6LpiyDgq m73w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690067716; x=1690672516; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqX+omN+4AV/jEW9gJWFZdBmlFQeDD8EFviSI3KwL+8=; b=eLenBmQTUY3EHLJWA8o1sEZTyNYppcTihuAIeEjq3zMkQjUwNaCfOLvq8VC3DF6aKU FHTnt+K1ToK39UE3zzFBzmHySNI/sM9XgwDzup+hxafgEa7TFcC82TxaSCzApEvVHSiq tCZ1/+9mFcgMpmfQJ0I609Lrp4aKP3Tjj+B+0PjDM+4qdlmzdogxaDnM57J1asxv9s5G cOIqGDc0MYRh4HfrwJ8hGX0+XKsyXA4cnX8Oq5hHE+aOHhMS8ZC0kJd5zeMSP5pVepiS 9yWbH9oCmMsu3y8V57NtW8dSF3qWuzDPp8gjLECRQdnm9hBad2K/xAsoNEHAPE7toB24 cvOg== X-Gm-Message-State: ABy/qLY4a6WU46dqcASOd835b7GG1oE2P4N1Lc/cCC8uovMtTqSpE2f+ CsnMq22/ymN2r6GhBxL7sdgNdA== X-Google-Smtp-Source: APBJJlFbRKGfdxJ0JTND8bD4QwfCFUoHWRvornko1ZnN1WHJ1NJtPHQPbc8oka0cm1metbm5E4tqEg== X-Received: by 2002:a05:620a:2807:b0:75b:23a0:e7e9 with SMTP id f7-20020a05620a280700b0075b23a0e7e9mr4800481qkp.74.1690067716634; Sat, 22 Jul 2023 16:15:16 -0700 (PDT) Received: from soleen.c.googlers.com.com (193.132.150.34.bc.googleusercontent.com. [34.150.132.193]) by smtp.gmail.com with ESMTPSA id u21-20020ae9c015000000b007675c4b530fsm2075957qkk.28.2023.07.22.16.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jul 2023 16:15:16 -0700 (PDT) From: Pasha Tatashin To: pasha.tatashin@soleen.com, akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, rick.p.edgecombe@intel.com Subject: [PATCH v2 3/3] mm/page_table_check: Check writable zero page in page table check Date: Sat, 22 Jul 2023 23:15:08 +0000 Message-ID: <20230722231508.1030269-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230722231508.1030269-1-pasha.tatashin@soleen.com> References: <20230722231508.1030269-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Rick Edgecombe The zero page should remain all zero, so that it can be mapped as read-only for read faults of memory that should be zeroed. If it is ever mapped writable to userspace, it could become non-zero and so other apps would unexpectedly get non-zero data. So the zero page should never be mapped writable to userspace. Check for this condition in page_table_check_set(). Signed-off-by: Rick Edgecombe Signed-off-by: Pasha Tatashin --- mm/page_table_check.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index ad4447e999f8..db1ed36f7203 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -114,6 +114,8 @@ static void page_table_check_set(struct mm_struct *mm, = unsigned long addr, if (!pfn_valid(pfn)) return; =20 + PAGE_TABLE_CHECK_WARN(is_zero_pfn(pfn) && rw); + page =3D pfn_to_page(pfn); page_ext =3D page_ext_get(page); =20 --=20 2.41.0.487.g6d72f3e995-goog