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, 27 Jun 2024 10:07:19 +0800
From: Lance Yang <ioworker0@...il.com>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Matthew Wilcox <willy@...radead.org>, Zi Yan <ziy@...dia.com>, 
	ran xiaokai <ranxiaokai627@....com>, akpm@...ux-foundation.org, vbabka@...e.cz, 
	svetly.todorov@...verge.com, ran.xiaokai@....com.cn, baohua@...nel.org, 
	peterx@...hat.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable
 compound pages

On Wed, Jun 26, 2024 at 11:18 PM Ryan Roberts <ryan.roberts@....com> wrote:
>
> On 26/06/2024 16:15, Matthew Wilcox wrote:
> > On Wed, Jun 26, 2024 at 12:07:04PM +0100, Ryan Roberts wrote:
> >> On 26/06/2024 04:06, Zi Yan wrote:
> >>> On Tue Jun 25, 2024 at 10:49 PM EDT, ran xiaokai wrote:
> >>>> From: Ran Xiaokai <ran.xiaokai@....com.cn>
> >>>>
> >>>> KPF_COMPOUND_HEAD and KPF_COMPOUND_TAIL are set on "common" compound
> >>>> pages, which means of any order, but KPF_THP should only be set
> >>>> when the folio is a 2M pmd mappable THP.
> >>
> >> Why should KPF_THP only be set on 2M THP? What problem does it cause as it is
> >> currently configured?
> >>
> >> I would argue that mTHP is still THP so should still have the flag. And since
> >> these smaller mTHP sizes are disabled by default, only mTHP-aware user space
> >> will be enabling them, so I'll naively state that it should not cause compat
> >> issues as is.
> >>
> >> Also, the script at tools/mm/thpmaps relies on KPF_THP being set for all mTHP
> >> sizes to function correctly. So that would need to be reworked if making this
> >> change.
> >
> > I told you you'd run into trouble calling them "mTHP" ...
>
> "There are two hard things in computer science; naming, cache invalidation and
> off-by-one errors"

Totally agree. Naming things can be surprisingly challenging ;)

Thanks,
Lance

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ