[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5cf3d2a8-563e-4fe5-a1a2-7af417bd8043@bytedance.com>
Date: Mon, 30 Oct 2023 10:32:05 +0800
From: Chuyi Zhou <zhouchuyi@...edance.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, martin.lau@...nel.org, tj@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH bpf-next v6 2/8] bpf: Introduce css_task open-coded
iterator kfuncs
Hello,
在 2023/10/30 01:09, Guenter Roeck 写道:
> On Wed, Oct 18, 2023 at 02:17:40PM +0800, Chuyi Zhou wrote:
>> This patch adds kfuncs bpf_iter_css_task_{new,next,destroy} which allow
>> creation and manipulation of struct bpf_iter_css_task in open-coded
>> iterator style. These kfuncs actually wrapps css_task_iter_{start,next,
>> end}. BPF programs can use these kfuncs through bpf_for_each macro for
>> iteration of all tasks under a css.
>>
>> css_task_iter_*() would try to get the global spin-lock *css_set_lock*, so
>> the bpf side has to be careful in where it allows to use this iter.
>> Currently we only allow it in bpf_lsm and bpf iter-s.
>>
>> Signed-off-by: Chuyi Zhou <zhouchuyi@...edance.com>
>> Acked-by: Tejun Heo <tj@...nel.org>
>
> With this patch in linux-next:
>
> Building m68k:defconfig ... failed
> --------------
> Error log:
> kernel/bpf/task_iter.c: In function 'bpf_iter_css_task_new':
> kernel/bpf/task_iter.c:917:14: error: 'CSS_TASK_ITER_PROCS' undeclared (first use in this function)
> 917 | case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED:
> | ^~~~~~~~~~~~~~~~~~~
> kernel/bpf/task_iter.c:917:14: note: each undeclared identifier is reported only once for each function it appears in
> kernel/bpf/task_iter.c:917:36: error: 'CSS_TASK_ITER_THREADED' undeclared (first use in this function)
> 917 | case CSS_TASK_ITER_PROCS | CSS_TASK_ITER_THREADED:
>
> My apologies for the noise if this has already been reported and/or fixed.
>
> Guenter
Here is the previous discussion link:
https://lore.kernel.org/lkml/20231020132749.1398012-1-arnd@kernel.org/
We can talk this issue on that maillist.
thanks.
Powered by blists - more mailing lists