From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov 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 09:56:44 -0700 Message-ID: <20180428165643.qnfvcc34pgnwgn2e@ast-mbp> References: <20180428070205.1059628-1-yhs@fb.com> <20180428070205.1059628-10-yhs@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org, kernel-team@fb.com To: Yonghong Song Return-path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:46970 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbeD1Q4r (ORCPT ); Sat, 28 Apr 2018 12:56:47 -0400 Received: by mail-pg0-f68.google.com with SMTP id z4-v6so3643961pgu.13 for ; Sat, 28 Apr 2018 09:56:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180428070205.1059628-10-yhs@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 ... > +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