mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Quentin Monnet <qmo@kernel.org>
To: "Thiébaud Weksteen" <tweek@google.com>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Shuah Khan" <shuah@kernel.org>, "KP Singh" <kpsingh@kernel.org>,
	"Leon Hwang" <leon.hwang@linux.dev>,
	"Emil Tsalapatis" <emil@etsalapatis.com>
Cc: Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Ihor Solodrai <ihor.solodrai@linux.dev>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 2/3] bpftool: Compute light skeleton ctx.sz without relying on links
Date: Fri, 18 Sep 2026 09:42:14 +0100	[thread overview]
Message-ID: <e54401aa-9dcb-433e-bdd9-ca3fc4f3865b@kernel.org> (raw)
In-Reply-To: <20260918040919.3402577-2-tweek@google.com>

2026-09-18 14:09 UTC+1000 ~ Thiébaud Weksteen <tweek@google.com>
> When generating a light skeleton, gen_trace() unconditionally sets
> skel->ctx.sz using (char *)&skel->links - (char *)skel. However, if a
> BPF object has no programs and no struct_ops maps (prog_cnt +
> attach_map_cnt == 0), do_skeleton() omits the links struct, causing the
> generated skeleton header to fail compilation.
> 
> Compute skel->ctx.sz from the end of progs (if prog_cnt > 0), maps (if
> map_cnt > 0), or ctx instead of relying on skel->links. Also remove the
> unused opts.data_sz argument passed to codegen().
> 
> Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.")
> Signed-off-by: Thiébaud Weksteen <tweek@google.com>
> ---
> No changes since v2


In that case you're welcome to keep my ack from v2 :)

Acked-by: Quentin Monnet <qmo@kernel.org>

  reply	other threads:[~2026-09-18  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  4:09 [PATCH bpf-next v3 1/3] bpftool: Skip non-autoload programs when generating light skeletons Thiébaud Weksteen
2026-09-18  4:09 ` [PATCH bpf-next v3 2/3] bpftool: Compute light skeleton ctx.sz without relying on links Thiébaud Weksteen
2026-09-18  8:42   ` Quentin Monnet [this message]
2026-09-18  4:09 ` [PATCH bpf-next v3 3/3] selftests/bpf: Add iter subtest using lskel in global_data_init Thiébaud Weksteen
2026-09-18  5:05   ` bot+bpf-ci
2026-09-18 13:36     ` Leon Hwang
2026-09-18  8:43 ` [PATCH bpf-next v3 1/3] bpftool: Skip non-autoload programs when generating light skeletons Quentin Monnet

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=e54401aa-9dcb-433e-bdd9-ca3fc4f3865b@kernel.org \
    --to=qmo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=leon.hwang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tweek@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®