All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: bot+bpf-ci@kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	eddyz87@gmail.com, memxor@gmail.com, john.fastabend@gmail.com,
	bpf@vger.kernel.org, void@manifault.com, arighi@nvidia.com,
	changwoo@igalia.com, emil@etsalapatis.com,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
	martin.lau@kernel.org, yonghong.song@linux.dev, clm@meta.com,
	ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next] bpf: sched_ext: Mark ops argument container pointer fields as trusted
Date: Wed, 19 Aug 2026 22:11:45 -1000	[thread overview]
Message-ID: <aoa2wQABalEFo5FT@slm.duckdns.org> (raw)
In-Reply-To: <758be5cbbea1b61eeaad2454d28f13a1acb1f3d0d50893b7707d9afdcea131e7@mail.kernel.org>

On Thu, Aug 20, 2026 at 06:16:48AM +0000, bot+bpf-ci@kernel.org wrote:
> >     bpf: sched_ext: Mark ops argument container pointer fields as trusted
> >
> >     Walking an unannotated pointer field of a trusted struct yields a bare
> >     PTR_TO_BTF_ID in non-sleepable programs, which kfuncs and helpers accept,
> >     but PTR_UNTRUSTED in sleepable programs, which they reject. This gets in the
> >     way of making ops.init_task() sleepable, which schedulers want for
> >     allocations. For example, passing args->cgroup into bpf_cgrp_storage_get()
> >     then fails verification and the only recourse is round-tripping through the
> >     cgroup ID with bpf_cgroup_from_id().
> >
> >     The pointer fields in the sched_ext ops argument containers are all pinned
> >     by the callers for the duration of the ops calls and are never NULL. Add
> >     them to the verifier's trusted-fields whitelist so that they are PTR_TRUSTED
> >     in both sleepable and non-sleepable programs.
> >
> >     Signed-off-by: Tejun Heo <tj@kernel.org>
> 
> This looks like a bug fix for verification failures in sleepable programs.
> Should this include:
> 
>   Fixes: 8195136669661 ("sched_ext: Add cgroup support")

Nothing has been using it, so not strictly necessary but yeah I don't see
why not.

Thanks.

-- 
tejun

      reply	other threads:[~2026-08-20  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  5:20 [PATCH bpf-next] bpf: sched_ext: Mark ops argument container pointer fields as trusted Tejun Heo
2026-08-20  6:16 ` bot+bpf-ci
2026-08-20  8:11   ` Tejun Heo [this message]

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=aoa2wQABalEFo5FT@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=andrii@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=changwoo@igalia.com \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=memxor@gmail.com \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    --cc=yonghong.song@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.