lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4679ec74-80a-ed13-e58e-654911fbab28@google.com>
Date:   Thu, 10 Jun 2021 16:02:47 -0700 (PDT)
From:   Hugh Dickins <hughd@...gle.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
cc:     Hugh Dickins <hughd@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Yang Shi <shy828301@...il.com>,
        Wang Yugui <wangyugui@...-tech.com>,
        Matthew Wilcox <willy@...radead.org>,
        Alistair Popple <apopple@...dia.com>,
        Ralph Campbell <rcampbell@...dia.com>, Zi Yan <ziy@...dia.com>,
        Peter Xu <peterx@...hat.com>, Will Deacon <will@...nel.org>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/11] mm: page_vma_mapped_walk(): crossing page table
 boundary

On Thu, 10 Jun 2021, Kirill A. Shutemov wrote:
> 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.

Would you prefer it with another line of comment after the
/* Did we cross page table boundary? */

Maybe,
/* Is address always page-aligned? No need to assume that. */

I just don't see the point in forcing alignment when the test is good
(and don't know for sure whether address is always aligned there or not).

I prefer to leave it as is, just letting the commit message document it.

> 
> > 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.

Thanks,
Hugh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ