mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Chuyi Zhou <zhouchuyi@bytedance.com>, bpf@vger.kernel.org
Cc: ast@kernel.org, andrii@kernel.org, martin.lau@kernel.org,
	tj@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 0/8] Add Open-coded task, css_task and css iters
Date: Tue, 10 Oct 2023 10:01:51 +0200	[thread overview]
Message-ID: <d25f9b70-e958-c229-c275-95ed664bf0ed@iogearbox.net> (raw)
In-Reply-To: <20231007124522.34834-1-zhouchuyi@bytedance.com>

On 10/7/23 2:45 PM, Chuyi Zhou wrote:
> Hi,
> 
> This is version 4 of task, css_task and css iters support.
> Thanks for your review!
> 
> --- Changelog ---
> 
> v3 -> v4:https://lore.kernel.org/all/20230925105552.817513-1-zhouchuyi@bytedance.com/
> 
> * Address all the comments from Andrii in patch-3 ~ patch-6
> * Collect Tejun's ack
> * Add a extra patch to rename bpf_iter_task.c to bpf_iter_tasks.c
> * Seperate three BPF program files for selftests (iters_task.c iters_css_task.c iters_css.c)

This fails to build BPF selftests:

[...]
  /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:166:6: error: variable 'skel' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:190:26: note: uninitialized use occurs here
           iters_css_task__destroy(skel);
                                   ^~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:166:2: note: remove the 'if' if its condition is always false
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:162:6: error: variable 'skel' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
           if (!ASSERT_GE(cg_fd, 0, "cg_create"))
     TEST-OBJ [test_progs] xdp.test.o
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:190:26: note: uninitialized use occurs here
           iters_css_task__destroy(skel);
                                   ^~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:162:2: note: remove the 'if' if its condition is always false
           if (!ASSERT_GE(cg_fd, 0, "cg_create"))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:159:6: error: variable 'skel' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:190:26: note: uninitialized use occurs here
           iters_css_task__destroy(skel);
                                   ^~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:159:2: note: remove the 'if' if its condition is always false
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:154:29: note: initialize the variable 'skel' to silence this warning
           struct iters_css_task *skel;
                                      ^
                                       = NULL
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:213:7: error: variable 'skel' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
                   if (!ASSERT_GE(cgs[i].fd, 0, "cg_create"))
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:244:21: note: uninitialized use occurs here
           iters_css__destroy(skel);
                              ^~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:213:3: note: remove the 'if' if its condition is always false
                   if (!ASSERT_GE(cgs[i].fd, 0, "cg_create"))
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:209:6: error: variable 'skel' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:244:21: note: uninitialized use occurs here
           iters_css__destroy(skel);
                              ^~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:209:2: note: remove the 'if' if its condition is always false
           if (!ASSERT_OK(err, "setup_cgroup_environment"))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/iters.c:195:24: note: initialize the variable 'skel' to silence this warning
           struct iters_css *skel;
                                 ^
                                  = NULL
   5 errors generated.
   make: *** [Makefile:605: /tmp/work/bpf/bpf/tools/testing/selftests/bpf/iters.test.o] Error 1
   make: *** Waiting for unfinished jobs....
   make: Leaving directory '/tmp/work/bpf/bpf/tools/testing/selftests/bpf'
   Error: Process completed with exit code 2.

  parent reply	other threads:[~2023-10-10  8:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 12:45 Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 1/8] cgroup: Prepare for using css_task_iter_*() in BPF Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 2/8] bpf: Introduce css_task open-coded iterator kfuncs Chuyi Zhou
2023-10-07 14:40   ` kernel test robot
2023-10-07 12:45 ` [PATCH bpf-next v4 3/8] bpf: Introduce task open coded " Chuyi Zhou
2023-10-07 15:22   ` kernel test robot
2023-10-07 12:45 ` [PATCH bpf-next v4 4/8] bpf: Introduce css open-coded " Chuyi Zhou
2023-10-07 16:05   ` kernel test robot
2023-10-11  4:44   ` Chuyi Zhou
2023-10-11  5:32     ` Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 5/8] bpf: teach the verifier to enforce css_iter and task_iter in RCU CS Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 6/8] bpf: Let bpf_iter_task_new accept null task ptr Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 7/8] selftests/bpf: rename bpf_iter_task.c to bpf_iter_tasks.c Chuyi Zhou
2023-10-07 12:45 ` [PATCH bpf-next v4 8/8] selftests/bpf: Add tests for open-coded task and css iter Chuyi Zhou
2023-10-10  8:01 ` Daniel Borkmann [this message]
2023-10-10  8:14   ` [PATCH bpf-next v4 0/8] Add Open-coded task, css_task and css iters Chuyi Zhou

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=d25f9b70-e958-c229-c275-95ed664bf0ed@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=tj@kernel.org \
    --cc=zhouchuyi@bytedance.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®