public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Brennan <stephen.s.brennan@oracle.com>
To: Eduard Zingerman <eddyz87@gmail.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alan Maguire <alan.maguire@oracle.com>,
	dwarves@vger.kernel.org, linux-debuggers@vger.kernel.org
Subject: Re: [PATCH 0/3] Fix duplicated VAR and secinfo
Date: Thu, 20 Feb 2025 17:05:04 -0800	[thread overview]
Message-ID: <875xl4kszj.fsf@oracle.com> (raw)
In-Reply-To: <1b0f9104586fa37a5480581e6dc59780b25d3b29.camel@gmail.com>

Eduard Zingerman <eddyz87@gmail.com> writes:

> On Tue, 2025-02-11 at 16:49 -0800, Stephen Brennan wrote:
>
> [...]
>
>> I've gone ahead and tested this by building & booting a kernel with these
>> changes, and the kernel patch series at [1]. The result exhibited no BPF
>> varidation errors, and the drgn BTF branch[2] is working perfectly with it!
>
> I tried out this patch-set:
> - applied it to pahole;
> - applied [1] to kernel;
> - configured kernel as in [2] to run BPF selftests.
>
> With this all done none of BPF selftests could be run.
> E.g. doing './test_progs -vvv -n 1' gets me the following error:
>
>   libbpf: Error in bpf_object__probe_loading(): -EINVAL. Couldn't load trivial BPF program. Make sure your kernel supports BPF (CONFIG_BPF_SYSCALL=y) and/or that RLIMIT_MEMLOCK is set to big enough value.
>
> If libbpf is hacked to print verifier log for
> bpf_object__probe_loading, the log looks as follows:
>
>   in-kernel BTF is malformed
>   processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
>
> BTF is broken in some nasty way, as nothing is printed to dmesg,
> even if I add some printk's inside bpf_get_btf_vmlinux().
> All I can see is that 'btf_vmlinux' is set to 0xffffffffffffffea very
> early in the boot process.
>
> [1] https://lore.kernel.org/bpf/20250207012045.2129841-1-stephen.s.brennan@oracle.com/
> [2] https://gist.github.com/eddyz87/5282db54255b81eed731b955dc5ea690

Thank you for the testing (and the review). I haven't yet been able to
reproduce this. But I see you're using clang. I'll spend the morning
building & running selftests with clang to see whether that is the
issue.

Thanks,
Stephen

  reply	other threads:[~2025-02-21  1:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  0:49 [PATCH 0/3] Fix duplicated VAR and secinfo Stephen Brennan
2025-02-12  0:49 ` [PATCH 1/3] btf_encoder: move btf_encoder__add_decl_tag() Stephen Brennan
2025-02-12  0:49 ` [PATCH 2/3] btf_encoder: postpone VARs until encoding DATASEC Stephen Brennan
2025-02-19 23:51   ` Eduard Zingerman
2025-02-12  0:49 ` [PATCH 3/3] btf_encoder: don't encode duplicate variables Stephen Brennan
2025-02-12 17:57   ` Alan Maguire
2025-02-12 18:21     ` Stephen Brennan
2025-02-18 10:36 ` [PATCH 0/3] Fix duplicated VAR and secinfo Alan Maguire
2025-02-18 16:54   ` Stephen Brennan
2025-02-19  7:48     ` Eduard Zingerman
2025-02-20  2:26 ` Eduard Zingerman
2025-02-21  1:05   ` Stephen Brennan [this message]
2025-02-21  1:30     ` Eduard Zingerman
2025-02-25  1:16       ` Stephen Brennan

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=875xl4kszj.fsf@oracle.com \
    --to=stephen.s.brennan@oracle.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=dwarves@vger.kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=linux-debuggers@vger.kernel.org \
    /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