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: <60FB78F1-BC48-4172-9669-DD3846F1F0E0@kernel.org>
Date:   Wed, 17 Apr 2019 12:48:05 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC:     Alexey Budankov <alexey.budankov@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] perf record: collect user registers set jointly with dwarf stacks

On April 17, 2019 11:40:02 AM GMT-03:00, Jiri Olsa <jolsa@...hat.com> wrote:
>On Wed, Apr 17, 2019 at 11:35:42AM -0300, Arnaldo Carvalho de Melo
>wrote:
>> Em Wed, Apr 17, 2019 at 09:39:52AM +0200, Jiri Olsa escreveu:
>> > On Mon, Apr 15, 2019 at 06:36:13PM +0300, Alexey Budankov wrote:
>> > > 
>> > > When dwarf stacks are collected jointly with user specified
>register
>> > > set using --user-regs option like below the full register context
>is
>> > > still captured on a sample:
>> > > 
>> > >   $ perf record -g --call-graph dwarf,1024 --user-regs=IP,SP,BP
>-- matrix.gcc.g.O3
>> > > 
>> > >   188143843893585 0x6b48 [0x4f8]: PERF_RECORD_SAMPLE(IP, 0x4002):
>23828/23828: 0x401236 period: 1363819 addr: 0x7ffedbdd51ac
>> > >   ... FP chain: nr:0
>> > >   ... user regs: mask 0xff0fff ABI 64-bit
>> > >   .... AX    0x53b
>> > >   .... BX    0x7ffedbdd3cc0
>> > >   .... CX    0xffffffff
>> > >   .... DX    0x33d3a
>> > >   .... SI    0x7f09b74c38d0
>> > >   .... DI    0x0
>> > >   .... BP    0x401260
>> > >   .... SP    0x7ffedbdd3cc0
>> > >   .... IP    0x401236
>> > >   .... FLAGS 0x20a
>> > >   .... CS    0x33
>> > >   .... SS    0x2b
>> > >   .... R8    0x7f09b74c3800
>> > >   .... R9    0x7f09b74c2da0
>> > >   .... R10   0xfffffffffffff3ce
>> > >   .... R11   0x246
>> > >   .... R12   0x401070
>> > >   .... R13   0x7ffedbdd5db0
>> > >   .... R14   0x0
>> > >   .... R15   0x0
>> > >   ... ustack: size 1024, offset 0xe0
>> > >    . data_src: 0x5080021
>> > >    ... thread: stack_test2.g.O:23828
>> > >    ...... dso: /root/abudanko/stacks/stack_test2.g.O3
>> > > 
>> > > After applying the change suggested in the patch the sample data
>contain
>> > > only user specified register values:
>> > > 
>> > >   $ perf record -g --call-graph dwarf,1024 --user-regs=IP,SP,BP
>-- matrix.gcc.g.03
>> > > 
>> > >   188368474305373 0x5e40 [0x470]: PERF_RECORD_SAMPLE(IP, 0x4002):
>23839/23839: 0x401236 period: 1260507 addr: 0x7ffd3d85e96c
>> > >   ... FP chain: nr:0
>> > >   ... user regs: mask 0x1c0 ABI 64-bit
>> > >   .... BP    0x401260
>> > >   .... SP    0x7ffd3d85cc20
>> > >   .... IP    0x401236
>> > >   ... ustack: size 1024, offset 0x58
>> > >    . data_src: 0x5080021
>> > >    ... thread: stack_test2.g.O:23839
>> > >    ...... dso: /root/abudanko/stacks/stack_test2.g.O3
>> > > 
>> > > Signed-off-by: Alexey Budankov <alexey.budankov@...ux.intel.com>
>> > 
>> > Acked-by: Jiri Olsa <jolsa@...nel.org>
>> 
>> So, there are registers that are needed to do the DWARF unwinding,
>> right? But at the same time, if the user says only some are needed,
>he
>> better know what they're doing and ask for at least the registers
>needed
>> for the unwinding process to be successfull, right?
>
>yep, that's how understand that

So we need to document that, stating that specifying a set of registers together with requesting DWARF callchains may break things.

- Arnaldo




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ