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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140312070621.GI17828@bbox>
Date:	Wed, 12 Mar 2014 16:06:21 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Jungsoo Son <jungsoo.son@....com>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH] page owners: correct page->order when to free page

On Wed, Mar 12, 2014 at 03:58:06PM +0900, Jungsoo Son wrote:
> When I use PAGE_OWNER in mmotm tree, I found a problem that mismatches
> the number of allocated pages. When I investigate, the problem is that
> set_page_order is called for only a head page if freed page is merged to
> a higher order page in the buddy allocator so tail pages of the higher
> order page couldn't be reset to page->order = -1.
> 
> It means when we do 'cat /proc/page-owner', it could show wrong
> information.

We could make read_page_owner more smart so that it could check
PageBuddy at head page of high order page and skip tail pages but
it needs zone->lock which is already heavy contention lock.
Additionally, it could make wrong information on pcp pages, too.
So, I like this simple approach.

> 
> So page->order should be set to -1 for all the tail pages as well as the
> first page before buddy allocator merges them.
> 
> This patch is for clearing page->order of all the tail pages in
> free_pages_prepare() when to free page.
> 
> Signed-off-by: Jungsoo Son <jungsoo.son@....com>
> Cc: Minchan Kim <minchan@...nel.org>
> Cc: Joonsoo Kim <iamjoonsoo.kim@....com>

Acked-by: Minchan Kim <minchan@...nel.org>

Thanks.

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ