Article View: linux.kernel.netdev
Article #4401Re: [PATCH bpf-next v2 05/43] bpf: reject sleepable programs for task_vma iterator
From: bot+bpf-ci
Date: Sat, 17 Oct 2026 17:16
Date: Sat, 17 Oct 2026 17:16
57 lines
7678 bytes
7678 bytes
--===============0189043960274367041==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
> bpf: reject sleepable programs for task_vma iterator
TL;DR: Documentation nit only: bpf_iterators.rst still says only
BPF_ITER_RESCHED is supported and doesn't mention the new BPF_ITER_NOSLEEP
flag. No code problems raised.
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index 54144372281c..46d325aa178e 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -3137,7 +3137,8 @@ typedef const struct bpf_func_proto *
> const struct bpf_prog *prog);
>
> enum bpf_iter_feature {
> - BPF_ITER_RESCHED = BIT(0),
> + BPF_ITER_RESCHED = BIT(0), /* may cond_resched() between objects */
> + BPF_ITER_NOSLEEP = BIT(1), /* ->show() can't run sleepable progs */
> };
>
> #define BPF_ITER_CTX_ARG_MAX 2
This isn't a bug, but should Documentation/bpf/bpf_iterators.rst be updated
for the new flag?
The description of the feature field in struct bpf_iter_reg still reads:
* - feature
- Specifies certain action requests in the kernel BPF iterator
infrastructure. Currently, only BPF_ITER_RESCHED is supported. This
means that the kernel function cond_resched() is called to avoid other
kernel subsystem (e.g., rcu) misbehaving.
With BPF_ITER_NOSLEEP added, "only BPF_ITER_RESCHED is supported" is no
longer accurate.
The text also doesn't say that BPF_ITER_RESCHED is what allows a target to
accept sleepable (iter.s/) programs, or that a target whose ->show() runs
under a lock that a faulting program would need to take again (as task_vma
does with mmap_lock) has to set BPF_ITER_NOSLEEP as well.
Someone adding a new iterator target from that document would not learn
about the flag. None of the later patches in this series touch
bpf_iterators.rst.
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/39051545464
--===============0189043960274367041==--
Technical Details
Message-ID:
<9e4f2779a5571380e019033e4d1c30a14ed609bffcd34faf2074b3a9c437703d@mail.kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347827-linux-kernel-netdev=dewy.ruReferences:
<20261017163745.3341787-6-alexei.starovoitov@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347827-linux-kernel-netdev=dewy.ru From: bot+bpf-ci@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH bpf-next v2 05/43] bpf: reject sleepable programs for task_vma iterator Date: Sat, 17 Oct 2026 17:16:57 +0000 (UTC) Organization: Usenet Network Message-ID: <9e4f2779a5571380e019033e4d1c30a14ed609bffcd34faf2074b3a9c437703d@mail.kernel.org> References: <20261017163745.3341787-6-alexei.starovoitov@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0189043960274367041==" Injection-Info: usenet.network; logging-data="3097012"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:W0pfz4MnbWPIP3t6p1Fr+r8NwAQ= sha256:to9bLIUB1hoCVT0pgLEAa+GQYBPU+3LuQ9CQtD+py1o= sha1:4oE7yd+pniCVT/6jagHQZajAE6g= sha256:W/n7tz260XmBjy2uapL8z7Xf/Syb7CeI8eXwGq8KSK8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 39C85110744; Sat, 17 Oct 2026 20:33:14 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h-iKfPoHyLyi; Sat, 17 Oct 2026 20:33:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-347827-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 6D89C11072D; Sat, 17 Oct 2026 20:33:01 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 88A4536B1C; Sat, 17 Oct 2026 17:17:09 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 310863939A4; Sat, 17 Oct 2026 17:17:00 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UjE0taz9" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FA603A7F41; Sat, 17 Oct 2026 17:16:58 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257420; cv=none; b=hI30vFSiwwOqw/RRfhgjCWY1XZdv5Zfx8ZoVGQ4ocXldH3glVCYxxUVYC4/OxnVuRoYA3QzrPy83taR45DD4ReXWw1ajlvr2yd/aMQfPiuvSb6Hqha1BJWCZKHeKJcDIoGV/k5YmCkS02y6babetzMmBVrW8YJ7CN0bs7hxWx5Q= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257420; c=relaxed/simple; bh=DPD/9R0avB6FY2jFkU1uGCRHhUmkd4Avmaw0OjrEAPk=; h=Content-Type:MIME-Version:Message-Id:In-Reply-To:References: Subject:From:To:Cc:Date; b=mHPjaEeMS/uiCSpzHiZnPK8Mkzr0StnLV9um5N5rDAgdcDhdU+i5TVptqOS/ixZ/LAEwKt95G0c8mgBSoLY1WBKdgBAD29S2wblfDudmofcuwPdBrTCveoVrfYmTRdiwpC2sxhHo0ugbc/eyEfzVIOKXnaR7yEpTORYqGQ1eqzE= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UjE0taz9; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B3A01F000C4; Sat, 17 Oct 2026 17:16:57 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792257418; bh=xBwu32tRzgrEuq9JG8gaNOJtBWCZK5VnaCyLTc2t8Co=; h=In-Reply-To:References:Subject:From:To:Cc:Date; b=UjE0taz9oIbJfxRWo86qXoHrOqTFGBEDLkLrwMQXV5ZoOYmSiVozU7ibpkeJPFgYe S94j16lnF1DKaX3btssLz55WjgrTaYPNWSjEns2NBkESlCowvHBwIe8MG9V+2ssAX7 /j2FqklYeWnvY7PQ25SUbk95p0VP5Ux9rhs2EdG8HbZiOpSF6Z7OSDPNuTH78ZjY/T j1fw7Xy2FPnYMElkR2YIEuxV3E9s3RVosv0LcB+nIqNVFDlV3hQXuuRSa7yYcfU//Q XkW0JazqpU51UkcqWhX6NS0rLKogog7YOVSPWTSt0HzPQrr5dBpraHG5QwoS9E8I7n tNRzj+DEYB+OQ== X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261017163745.3341787-6-alexei.starovoitov@gmail.com> X-Cc: daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,netdev@vger.kernel.org,josef@toxicpanda.com,mason@kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev