From: Clark Williams <williams@redhat.com>
To: Wander Lairson Costa <wander@redhat.com>
Cc: linux-rt-users@vger.kernel.org,
Derek Barbosa <debarbos@redhat.com>,
John Kacur <jkacur@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Chunsheng Luo <luochunsheng@ustc.edu>
Subject: Re: [PATCH] bpf: Add BPF CO-RE compatibility for older kernels
Date: Tue, 4 Nov 2025 13:57:14 -0600 [thread overview]
Message-ID: <aQpamuow4ucROOAK@lysander> (raw)
In-Reply-To: <20251104141144.31173-1-wander@redhat.com>
On Tue, Nov 04, 2025 at 11:11:44AM -0300, Wander Lairson Costa wrote:
> Introduce a `thread_info___legacy` struct to provide BPF CO-RE
> compatibility for older kernels (e.g., RHEL 8.x with 4.18) where the
> `thread_info` struct lacks the `cpu` field. This allows `bpf_core_field_exists()`
> checks to correctly determine the availability of this field at runtime,
> preventing build failures on such systems.
>
> The `task_cpu` helper function is updated to utilize this new legacy
> struct when accessing the `cpu` field from `thread_info`, ensuring
> that the BPF program can adapt to different kernel versions.
>
> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
> Cc: Derek Barbosa <debarbos@redhat.com>
> Cc: John Kacur <jkacur@redhat.com>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Chunsheng Luo <luochunsheng@ustc.edu>
Applied to my devel branch along with the BPF verbose patch to the
Makefile. I'm assembling the v1.25.1 release which will be these two
changes and the current test-suite. Hopefully will go out today or
tomorrow.
Clark
--
The United States Coast Guard
Ruining Natural Selection since 1790
prev parent reply other threads:[~2025-11-04 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 14:11 [PATCH] bpf: Add BPF CO-RE compatibility for older kernels Wander Lairson Costa
2025-11-04 19:57 ` Clark Williams [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=aQpamuow4ucROOAK@lysander \
--to=williams@redhat.com \
--cc=debarbos@redhat.com \
--cc=jkacur@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=luochunsheng@ustc.edu \
--cc=wander@redhat.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 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.