From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE310C47094 for ; Thu, 10 Jun 2021 09:31:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7EBD1610A7 for ; Thu, 10 Jun 2021 09:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EBD1610A7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C6C16B0036; Thu, 10 Jun 2021 05:31:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 077286B006E; Thu, 10 Jun 2021 05:31:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E59706B0070; Thu, 10 Jun 2021 05:31:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id B50066B0036 for ; Thu, 10 Jun 2021 05:31:50 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 43F29362D for ; Thu, 10 Jun 2021 09:31:50 +0000 (UTC) X-FDA: 78237297180.31.8B2B40D Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by imf27.hostedemail.com (Postfix) with ESMTP id C8CC98019377 for ; Thu, 10 Jun 2021 09:31:44 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id bp38so2224410lfb.0 for ; Thu, 10 Jun 2021 02:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=g+Y5ZivuFcmuf7Flo1ol8YPyjTyhr8NhAnLzV5ueT74=; b=jaEsEWC8fl4uP6hpimePVfNEmdSw7OHIY0EYdlK9Lqk6IwlaujBFd1RoXVZb6gopsQ oTExhfZMQM6DGsxA4GXTZm7a7HuLaA1z8j1IOTRkmi3rFVNWrUzxIsy2fPcuoL3SeKN0 JhMwOXUv2Wve1RkXXI3Iynp4uRynMrqWvTWkxL6cG5B0MWmV9Dx6WPhgFaia1bwTOdxF EAuk3Aen1TxxIJlR3rWyTSfZ45CWTEuRlHCGAd5ZttEi/EFlIVdGpdBuPHo+YhqYRUKM QmrHs/rwM7e8V3/8NFcllE+s3jcoTn3e+gRwVSoQJ8FvEs9BFY7Ut3MuqvjBXe3+O3ok xekA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=g+Y5ZivuFcmuf7Flo1ol8YPyjTyhr8NhAnLzV5ueT74=; b=q2uR+i3X2eqmCyfGbhZWRyMvUHBCjN4mJRFtAkeoWerCH1d7HX0P0kPdR5V30uziNl Tbi6jWyGQ/hLeymWowsd5OYMNzzpm+UDZMU17X+rxy1XnK1e9o1/peqNwnFGfxD/b7HK P7rDISosRWdeSyK1XWu78O0ABJHu2dux6fmY1RyrvwhD/T55GkWRvClBF5OjZnEaTpDM XL4XNCKjsP7baIAL5VYULVHyjs9IKV/MDO+nkanDV7b1hK/tOLXEqxjeqCmkRTeapsWj +cYv06fr7+wjzqszSAfkT3DX9Viu7oIodSRkHVV5LyT9x5OsnKLNcH1v4UoW53jfXncR JT2g== X-Gm-Message-State: AOAM532VHQCDeOqF9J9WOgB3zwy+Ifpeb/aEJyUMUgqUdRo7Fijat2Px lxB0G70dfvC5bHxbu0WwCURLfmkwcJ1gGQ== X-Google-Smtp-Source: ABdhPJyrE2vXn+tTVAuLau4gyY8tBxxXrBVXNu4X49cCz0jE7e1Z15hZFqbdFySt7jw4NvWcUXXLFw== X-Received: by 2002:a05:6512:3baa:: with SMTP id g42mr1358231lfv.195.1623317508561; Thu, 10 Jun 2021 02:31:48 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id h11sm245317lfc.247.2021.06.10.02.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 02:31:47 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id CD8821027EE; Thu, 10 Jun 2021 12:32:03 +0300 (+03) Date: Thu, 10 Jun 2021 12:32:03 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Yang Shi , Wang Yugui , Matthew Wilcox , Alistair Popple , Ralph Campbell , Zi Yan , Peter Xu , Will Deacon , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] mm: page_vma_mapped_walk(): crossing page table boundary Message-ID: <20210610093203.x42jpifagiavmrlp@box.shutemov.name> References: <589b358c-febc-c88e-d4c2-7834b37fa7bf@google.com> <799b3f9c-2a9e-dfef-5d89-26e9f76fd97@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <799b3f9c-2a9e-dfef-5d89-26e9f76fd97@google.com> Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=jaEsEWC8; spf=none (imf27.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.46) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Stat-Signature: dctjwtnb1p7xc3kocbxfh5zst66u4q7a X-Rspamd-Queue-Id: C8CC98019377 X-Rspamd-Server: rspam06 X-HE-Tag: 1623317504-543812 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: On Wed, Jun 09, 2021 at 11:44:10PM -0700, Hugh Dickins wrote: > page_vma_mapped_walk() cleanup: adjust the test for crossing page table > boundary - I believe pvmw->address is always page-aligned, but nothing > else here assumed that; Maybe we should just get it aligned instead? (PMD_SIZE - PAGE_SIZE) is not most obvious mask calculation. > and remember to reset pvmw->pte to NULL after > unmapping the page table, though I never saw any bug from that. Okay, it's fair enough. -- Kirill A. Shutemov