[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQi2PQbtHX-bLzoR@slm.duckdns.org>
Date: Mon, 18 Sep 2023 10:42:37 -1000
From: Tejun Heo <tj@...nel.org>
To: Chuyi Zhou <zhouchuyi@...edance.com>
Cc: bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, martin.lau@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 1/6] cgroup: Prepare for using
css_task_iter_*() in BPF
On Tue, Sep 12, 2023 at 03:01:44PM +0800, Chuyi Zhou wrote:
> This patch makes some preparations for using css_task_iter_*() in BPF
> Program.
>
> 1. Flags CSS_TASK_ITER_* are #define-s and it's not easy for bpf prog to
> use them. Convert them to enum so bpf prog can take them from vmlinux.h.
>
> 2. In the next patch we will add css_task_iter_*() in common kfuncs which
> is not safe. Since css_task_iter_*() does spin_unlock_irq() which might
> screw up irq flags depending on the context where bpf prog is running.
> So we should use irqsave/irqrestore here and the switching is harmless.
>
> Signed-off-by: Chuyi Zhou <zhouchuyi@...edance.com>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists