From patchwork Thu Jan 20 04:25:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12718244 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEC07C433EF for ; Thu, 20 Jan 2022 04:25:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F7976B00BC; Wed, 19 Jan 2022 23:25:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A7406B00BE; Wed, 19 Jan 2022 23:25:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 046686B00C0; Wed, 19 Jan 2022 23:25:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id E8D866B00BC for ; Wed, 19 Jan 2022 23:25:17 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7AA9295C87 for ; Thu, 20 Jan 2022 04:25:17 +0000 (UTC) X-FDA: 79049375874.06.731B774 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by imf14.hostedemail.com (Postfix) with ESMTP id 15B0510000B for ; Thu, 20 Jan 2022 04:25:16 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id j85so5144204qke.2 for ; Wed, 19 Jan 2022 20:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KaPKpkE+NUZcXeTKIXr2Mnojuzo73Hat0EIRCUdPF9k=; b=dwohxivkrETs1vxp7Yak9azruSMiVSj+cVNsfPqp4adBisOVxzwCeDN4SfQu9Z67mB BBxY6zETfXXKIsv3+UQFKk4lvlVUrxNKzpDqYpqB1N9SmQxBuNIM2LgaX+3z+WGEILZY dR88dPBLPEpIkAWCwOw6RRyKo7/BcONTw4Y4F8ixDUQKHAkvYFVcYrfk8URfniBuBkPP 6TIhF/3WfItwoX5917sRd9EcNkHyKku80Hf7k5Cj6PYgpb4sNToMtCZBY+ID6nTr407k 0Auzi+JVuFGw8g2CnK3NKpCwDuKDai8G2bdRAKQo/lCiv51g0NDq9Sk4GrSvJlhrQ3yg Nd/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=KaPKpkE+NUZcXeTKIXr2Mnojuzo73Hat0EIRCUdPF9k=; b=2kLMEt1ZCQ/eWpk3vDiRcddRwL9ctq5Uj6Xb4BHYS9cVHEneJmq4t8UVKPtcZR2wqm qjI+5D5WhOyZlqq1ytU6Vu8W2mDY0ARGUUAgLtvJbcbH+XlsEDNprpZ7RJERB6fPhmQw PsTBup5Ap36B5At0evmLM+fweMGLlt6dyQa5ldaKWx1RMzQAoBsyNQpZBalN+JB6m60G TUIiWO8twkqb+v9iO/LSrjokAonryR53k53P7iWCOV0FRHYHdZZmgnhvblYQ/EGIhXkO Bsm+HwwjvfAU2nF2ul76pmUQMhWuWXVuDK6ise+DU4A5e33Gb8yHgrt9QugKeOM6IYG9 Pekg== X-Gm-Message-State: AOAM530ahqKkpWmfnIGz2H3bB5a6LS8ABhoLdJGJklb/cNRFFu8yUG1X CzMg/EFb2ZJxsb/Eupk1Fb+WWg== X-Google-Smtp-Source: ABdhPJxhxy/bAom7rYxKqHlW4qlVEweOMLw73JqhmfVuLg2rSFS+24sE98FKjGXZ1I6/8DbmWREL8A== X-Received: by 2002:a05:620a:1a99:: with SMTP id bl25mr19970281qkb.529.1642652716239; Wed, 19 Jan 2022 20:25:16 -0800 (PST) Received: from soleen.c.googlers.com.com (189.216.85.34.bc.googleusercontent.com. [34.85.216.189]) by smtp.gmail.com with ESMTPSA id n22sm927228qka.46.2022.01.19.20.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 20:25:15 -0800 (PST) From: Pasha Tatashin To: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, rientjes@google.com, pjt@google.com, weixugc@google.com, gthelen@google.com, mingo@redhat.com, will@kernel.org, rppt@kernel.org, dave.hansen@linux.intel.com, hpa@zytor.com, aneesh.kumar@linux.ibm.com, jirislaby@kernel.org, songmuchun@bytedance.com, qydwhotmail@gmail.com, hughd@google.com, ziy@nvidia.com, anshuman.khandual@arm.com Subject: [PATCH 0/3] page table check fixes and cleanups Date: Thu, 20 Jan 2022 04:25:10 +0000 Message-Id: <20220120042513.1648831-1-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.34.1.703.g22d0c6ccf7-goog MIME-Version: 1.0 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 15B0510000B X-Stat-Signature: 9sqmfszt9pzfh171q1ug46bd9ybbsoon Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=soleen.com header.s=google header.b=dwohxivk; dmarc=none; spf=pass (imf14.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com X-HE-Tag: 1642652716-853176 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: Two fixes: mm/debug_vm_pgtable: remove pte entry from the page table - remove a pte entry from the page table at the end of debug_vm_pgtable pte test mm/page_table_check: check entries at pud and pmd levels - check pmd and pud levels in page_table_check for regular entries not only for huge pages when entries are replaced or cleared. repro.c: https://gist.github.com/soleen/fdcd501d5df103976245fe84e9535087 config: https://gist.github.com/soleen/8a56f923c2fea9ce9c75b4e2517d4162 qemu_script: https://gist.github.com/soleen/f4be4795826b7ab1a51ae659582e179c base image: https://storage.googleapis.com/syzkaller/wheezy.img https://storage.googleapis.com/syzkaller/wheezy.img.key Small cleanup: mm/page_table_check: use unsigned long for page counters Pasha Tatashin (3): mm/debug_vm_pgtable: remove pte entry from the page table mm/page_table_check: check entries at pud and pmd levels mm/page_table_check: use unsigned long for page counters mm/debug_vm_pgtable.c | 1 + mm/page_table_check.c | 60 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 4 deletions(-)