From: Song Liu <songliubraving@fb.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
Kernel Team <Kernel-team@fb.com>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"kpsingh@chromium.org" <kpsingh@chromium.org>,
"brouer@redhat.com" <brouer@redhat.com>
Subject: Re: [PATCH v3 bpf-next 1/2] bpf: separate bpf_get_[stack|stackid] for perf events BPF
Date: Wed, 22 Jul 2020 16:49:47 +0000 [thread overview]
Message-ID: <1BF0973C-E2E5-49E3-B3F9-80FF7D6727B2@fb.com> (raw)
In-Reply-To: <20200722154010.GO10769@hirez.programming.kicks-ass.net>
> On Jul 22, 2020, at 8:40 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Tue, Jul 21, 2020 at 10:40:19PM +0000, Song Liu wrote:
>
>> We only need to block precise_ip >= 2. precise_ip == 1 is OK.
>
> Uuuh, how? Anything PEBS would have the same problem. Sure, precise_ip
> == 1 will not correct the IP, but the stack will not match regardless.
>
> You need IP,SP(,BP) to be a consistent set _AND_ have it match the
> current stack, PEBS simply cannot do that, because the regs get recorded
> (much) earlier than the PMI and the stack can have changed in the
> meantime.
>
By "OK", I meant unwinder will not report error (in my tests). For
accurate stack, we should do the same for precise_ip == 1.
Thanks,
Song
prev parent reply other threads:[~2020-07-22 16:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 22:59 [PATCH v3 bpf-next 0/2] bpf: fix stackmap on perf_events with PEBS Song Liu
2020-07-16 22:59 ` [PATCH v3 bpf-next 1/2] bpf: separate bpf_get_[stack|stackid] for perf events BPF Song Liu
2020-07-21 19:10 ` Alexei Starovoitov
2020-07-21 22:40 ` Song Liu
2020-07-21 22:43 ` Alexei Starovoitov
2020-07-21 22:51 ` Song Liu
2020-07-22 15:40 ` Peter Zijlstra
2020-07-22 16:49 ` Song Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1BF0973C-E2E5-49E3-B3F9-80FF7D6727B2@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=alexei.starovoitov@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).