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: <CY4PR21MB063262D81AB2BE5FEE88057EF77A0@CY4PR21MB0632.namprd21.prod.outlook.com>
Date:   Sat, 9 Nov 2019 16:49:25 +0000
From:   Steve MacLean <Steve.MacLean@...rosoft.com>
To:     Jiri Olsa <jolsa@...hat.com>,
        Steve MacLean <steve.maclean@...ux.microsoft.com>,
        Stephane Eranian <eranian@...gle.com>
CC:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] perf inject --jit: Remove //anon mmap events

> > While a JIT is jitting code it will eventually need to commit more 
> > pages and change these pages to executable permissions.
> > 
> > Typically the JIT will want these colocated to minimize branch displacements.
> > 
> > The kernel will coalesce these anonymous mapping with identical 
> > permissions before sending an MMAP event for the new pages. This means 
> > the mmap event for the new pages will include the older pages.
> > 
> > These anonymous mmap events will obscure the jitdump injected pseudo events.
> > This means that the jitdump generated symbols, machine code, debugging 
> > info, and unwind info will no longer be used.
> > 
> > Observations:
> > 
> > When a process emits a jit dump marker and a jitdump file, the 
> > perf-xxx.map file represents inferior information which has been 
> > superceded by the jitdump jit-xxx.dump file.
> > 
> > Further the '//anon*' mmap events are only required for the legacy 
> > perf-xxx.map mapping.
> > 
> > When attaching to an existing process, the synthetic anon map events 
> > are given a time stamp of -1. These should not obscure the jitdump 
> > events which have an actual time.
> > 
> > Summary:
> > 
> > Use thread->priv to store whether a jitdump file has been processed
> 
> I'm ok wih the implementation but not sure about the described JIT/mmap logic, Stephane?
> 
> jirka

The kernel only seems to coalesce the anonymous mappings when the allocations grow beyond 64K. It may not affect JITs for smaller sets of JITted code.  I would guess a javascript JIT engine might not hit this type of problem often.

@Stephane Eranian could you comment.

@Jiri Olsa I am happy to expand the explanation if it would be helpful.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ