All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Y Song <ys114321@gmail.com>
Cc: Yonghong Song <yhs@fb.com>, Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	netdev <netdev@vger.kernel.org>,
	kernel-team@fb.com
Subject: Re: [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog
Date: Sat, 28 Apr 2018 12:06:23 -0700	[thread overview]
Message-ID: <20180428190622.7cxrsqmxwn33cscf@ast-mbp> (raw)
In-Reply-To: <CAH3MdRVpmJE9gqz=41fddmxjRw_ZF0sAqiewEHnYxWYij0jfew@mail.gmail.com>

On Sat, Apr 28, 2018 at 11:17:30AM -0700, Y Song wrote:
> On Sat, Apr 28, 2018 at 9:56 AM, Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> > On Sat, Apr 28, 2018 at 12:02:04AM -0700, Yonghong Song wrote:
> >> The test attached a raw_tracepoint program to sched/sched_switch.
> >> It tested to get stack for user space, kernel space and user
> >> space with build_id request. It also tested to get user
> >> and kernel stack into the same buffer with back-to-back
> >> bpf_get_stack helper calls.
> >>
> >> Whenever the kernel stack is available, the user space
> >> application will check to ensure that the kernel function
> >> for raw_tracepoint ___bpf_prog_run is part of the stack.
> >>
> >> Signed-off-by: Yonghong Song <yhs@fb.com>
> > ...
> >> +static int get_stack_print_output(void *data, int size)
> >> +{
> >> +     bool good_kern_stack = false, good_user_stack = false;
> >> +     const char *expected_func = "___bpf_prog_run";
> >
> > so the test works with interpreter only?
> > I guess that's ok for now, but needs to fixed for
> > configs with CONFIG_BPF_JIT_ALWAYS_ON=y
> 
> I did not test CONFIG_BPF_JIT_ALWAYS_ON=y.
> I can have a followup patch for this if the patch set does not need respin.

I was thinking to apply the set and do the fix in the follow up,
but testing it with jit_enable=1 I don't see it's failing,
so something is wrong with the test.
Also get_stack_raw_tp_action() keeps spawning new 'dd' in the background
which is not killed after test stops.
Please fix both issues in respin.

  reply	other threads:[~2018-04-28 19:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-28  7:01 [PATCH bpf-next v8 00/10] bpf: add bpf_get_stack helper Yonghong Song
2018-04-28  7:01 ` [PATCH bpf-next v8 01/10] bpf: change prototype for stack_map_get_build_id_offset Yonghong Song
2018-04-28  7:01 ` [PATCH bpf-next v8 02/10] bpf: add bpf_get_stack helper Yonghong Song
2018-04-28  7:01 ` [PATCH bpf-next v8 03/10] bpf/verifier: refine retval R0 state for " Yonghong Song
2018-04-28  7:01 ` [PATCH bpf-next v8 04/10] bpf: remove never-hit branches in verifier adjust_scalar_min_max_vals Yonghong Song
2018-04-28  7:02 ` [PATCH bpf-next v8 05/10] bpf/verifier: improve register value range tracking with ARSH Yonghong Song
2018-04-28 16:52   ` Alexei Starovoitov
2018-04-28  7:02 ` [PATCH bpf-next v8 06/10] tools/bpf: add bpf_get_stack helper to tools headers Yonghong Song
2018-04-28  7:02 ` [PATCH bpf-next v8 07/10] samples/bpf: move common-purpose trace functions to selftests Yonghong Song
2018-04-28  7:02 ` [PATCH bpf-next v8 08/10] tools/bpf: add a verifier test case for bpf_get_stack helper and ARSH Yonghong Song
2018-04-28  7:02 ` [PATCH bpf-next v8 09/10] tools/bpf: add a test for bpf_get_stack with raw tracepoint prog Yonghong Song
2018-04-28 16:56   ` Alexei Starovoitov
2018-04-28 18:17     ` Y Song
2018-04-28 19:06       ` Alexei Starovoitov [this message]
2018-04-28 20:02         ` Yonghong Song
2018-04-28  7:02 ` [PATCH bpf-next v8 10/10] tools/bpf: add a test for bpf_get_stack with " Yonghong Song

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=20180428190622.7cxrsqmxwn33cscf@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    --cc=ys114321@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.