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] [day] [month] [year] [list]
Message-ID: <20221022193413.ihgfs5ipy3la3c6a@techsingularity.net>
Date:   Sat, 22 Oct 2022 20:34:13 +0100
From:   Mel Gorman <mgorman@...hsingularity.net>
To:     Hugh Dickins <hughd@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm: prep_compound_tail() clear page->private

On Sat, Oct 22, 2022 at 12:51:06AM -0700, Hugh Dickins wrote:
> Although page allocation always clears page->private in the first page
> or head page of an allocation, it has never made a point of clearing
> page->private in the tails (though 0 is often what is already there).
> 
> But now commit 71e2d666ef85 ("mm/huge_memory: do not clobber swp_entry_t
> during THP split") issues a warning when page_tail->private is found to
> be non-0 (unless it's swapcache).
> 
> Change that warning to dump page_tail (which also dumps head), instead
> of just the head: so far we have seen dead000000000122, dead000000000003,
> dead000000000001 or 0000000000000002 in the raw output for tail private.
> 

The intent behind dumping the head was because I expected we'd be mid-split
and the head page was more meaningful but your patch also works.

> We could just delete the warning, but today's consensus appears to want
> page->private to be 0, unless there's a good reason for it to be set:

This was also on purpose. I suspected the warning would create a few new
reports but if page->private should be 0 then it's better to start catching
it now instead of later. At least we're still in an early rc kernel.

> so now clear it in prep_compound_tail() (more general than just for THP;
> but not for high order allocation, which makes no pass down the tails).
> 
> Fixes: 71e2d666ef85 ("mm/huge_memory: do not clobber swp_entry_t during THP split")
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Cc: Matthew Wilcox (Oracle) <willy@...radead.org>
> Cc: <stable@...r.kernel.org>

Thanks Hugh.

Acked-by: Mel Gorman <mgorman@...hsingularity.net>

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ