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]
Date:   Thu, 20 Dec 2018 14:41:32 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Wei Yang <richard.weiyang@...il.com>, akpm@...ux-foundation.org,
        vbabka@...e.cz, pavel.tatashin@...rosoft.com,
        rppt@...ux.vnet.ibm.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

On Thu, Dec 20, 2018 at 02:06:06PM +0100, Michal Hocko wrote:
> On Thu 20-12-18 13:49:28, Oscar Salvador wrote:
> > On Thu, Dec 20, 2018 at 10:12:28AM +0100, Michal Hocko wrote:
> > > > <--
> > > > skip_pages = (1 << compound_order(head)) - (page - head);
> > > > iter = skip_pages - 1;
> > > > --
> > > > 
> > > > which looks more simple IMHO.
> > > 
> > > Agreed!
> > 
> > Andrew, can you please apply the next diff chunk on top of the patch:
> > 
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 4812287e56a0..978576d93783 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -8094,7 +8094,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
> >  				goto unmovable;
> >  
> >  			skip_pages = (1 << compound_order(head)) - (page - head);
> > -			iter = round_up(iter + 1, skip_pages) - 1;
> > +			iter = skip_pages - 1;
> 
> You did want iter += skip_pages - 1 here right?

Bleh, yeah.
I am taking vacation today so my brain has left me hours ago, sorry.
Should be:

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4812287e56a0..0634fbdef078 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8094,7 +8094,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
                                goto unmovable;
 
                        skip_pages = (1 << compound_order(head)) - (page - head);
-                       iter = round_up(iter + 1, skip_pages) - 1;
+                       iter += skip_pages - 1;
                        continue;
                }


-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists