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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190417070735.GW4038@hirez.programming.kicks-ass.net>
Date:   Wed, 17 Apr 2019 09:07:35 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Kairui Song <kasong@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>, Dave Young <dyoung@...hat.com>
Subject: Re: [RFC PATCH v2] perf/x86: make perf callchain work without
 CONFIG_FRAME_POINTER

On Tue, Apr 16, 2019 at 03:15:59PM -0500, Josh Poimboeuf wrote:
> If you do the regs->eflags thing to mark the regs as fake in
> (perf_arch_fetch_caller_regs()), then I don't think skip_sp would be
> needed, because regs->sp could probably mark the skip point.
> 
> Instead I was actually hoping we could get rid of fake regs and
> perf_arch_fetch_caller_regs() altogether, because it's a nasty hack.
> But I don't know what else those fake regs are used for.

This is the generic perf generate a sample path. It doesn't know the
context. Normally it is an interrupt or exception of sorts and we simply
pass the pt_regs from that down the chain and all is good.

It is just for a few software events, such as SW_CONTEXT_SWITCH,
SW_MIGRATIONS and all the TP muck that we do not have regs to pass down.

These regs are used by:

 - SAMPLE_IP,
 - SAMPLE_CALLCHAIN (this here issue),
 - SAMPLE_REGS_INTR,
 - a few misc bits

There's actually comment on top of perf_fetch_caller_regs() that tries
to explain what is needed -- although I suppose that could do with an
update.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ