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:   Wed, 1 Jul 2020 08:35:40 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Peter Xu <peterx@...hat.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        John Hubbard <jhubbard@...dia.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Gerald Schaefer <gerald.schaefer@...ibm.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Will Deacon <will@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v4 23/26] mm/x86: Use general page fault accounting

On 6/30/20 1:46 PM, Peter Xu wrote:
> Use the general page fault accounting by passing regs into handle_mm_fault().
...
> -	/*
> -	 * Major/minor page fault accounting. If any of the events
> -	 * returned VM_FAULT_MAJOR, we account it as a major fault.
> -	 */
> -	if (major) {
> -		tsk->maj_flt++;
> -		perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
> -	} else {
> -		tsk->min_flt++;
> -		perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
> -	}
> -
>  	check_v8086_mode(regs, address, tsk);
>  }

I did a quick grep and it wasn't obvious to me how
PERF_COUNT_SW_PAGE_FAULTS_MIN/MAJ get bumped in the handle_mm_fault() path.

Are you sure they get set?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ