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]
Message-ID: <20200810224734.GO3982@worktop.programming.kicks-ass.net>
Date:   Tue, 11 Aug 2020 00:47:34 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Liang, Kan" <kan.liang@...ux.intel.com>
Cc:     Dave Hansen <dave.hansen@...el.com>, acme@...nel.org,
        mingo@...hat.com, linux-kernel@...r.kernel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...hat.com, eranian@...gle.com, ak@...ux.intel.com,
        kirill.shutemov@...ux.intel.com
Subject: Re: [PATCH V6 01/16] perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE

On Mon, Aug 10, 2020 at 06:38:35PM -0400, Liang, Kan wrote:
> On 8/10/2020 5:47 PM, Dave Hansen wrote:

> > It's probably best if we very carefully define up front what is getting
> > reported here.  For instance, I believe we already have some fun cases
> > with huge tmpfs where a compound page is mapped with 4k PTEs.  Kirill
> > also found a few drivers doing this as well.  I think there were also
> > some weird cases for ARM hugetlbfs where there were multiple hardware
> > page table entries mapping a single hugetlbfs page.  These would be
> > cases where compound_head() size would be greater than the size of the
> > leaf paging structure entry.
> > 
> > This is also why we have KerelPageSize and MMUPageSize in /proc/$pid/smaps.
> > 
> > So, is this returning the kernel software page size or the MMU size?
> > 
> 
> This tries to return the kernel software page size. I will add a commit to
> the function. For the above cases, I think they can be detected by
> PageCompound(page). The current code should already cover them. Is my
> understanding correct?

But the rationale for the whole feature was to measure and possibly
drive large page promotion/demotion, which requires the mmu page-size.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ