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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Dec 2020 10:56:55 -0800
From:   Linus Torvalds <>
To:     "Kirill A. Shutemov" <>
Cc:     Matthew Wilcox <>,
        "Kirill A. Shutemov" <>,
        Will Deacon <>,
        Linux Kernel Mailing List <>,
        Linux-MM <>,
        Linux ARM <>,
        Catalin Marinas <>,
        Jan Kara <>, Minchan Kim <>,
        Andrew Morton <>,
        Vinayak Menon <>,
        Android Kernel Team <>
Subject: Re: [PATCH 1/2] mm: Allow architectures to request 'old' entries when prefaulting

On Fri, Dec 18, 2020 at 3:04 AM Kirill A. Shutemov <> wrote:
> This should do. See below.

Looks fine.

> > Then that second loop very naturally becomes a "do { } while ()" one.
> I don't see it. I haven't found a reasonable way to rework it do-while.

Now that you return early for the "HEAD == NULL" case, this loop:

        for (; head; head = xas_next_entry(&xas, end_pgoff)) {

very naturally becomes

        do {
        } while ((head = xas_next_entry(&xas, end_pgoff)) != NULL);

because the initial test for 'head' being NULL is no longer needed,
and thus it's a lot more logical to just test it at the end of the
loop when we update it.


Maybe I'm missing something silly.


Powered by blists - more mailing lists