linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: bpf-restrict-fs fails to load without DYNAMIC_FTRACE_WITH_DIRECT_CALLS on arm64
Date: Tue, 10 Jun 2025 19:05:22 -0700	[thread overview]
Message-ID: <20250611020522.GA3981304@ax162> (raw)
In-Reply-To: <CAADnVQ+jNQyC=RcoiwDXeHj9y6CGzr322scz_8uGwCDVx-Od4Q@mail.gmail.com>

On Tue, Jun 10, 2025 at 04:37:24PM -0700, Alexei Starovoitov wrote:
> On Tue, Jun 10, 2025 at 4:24 PM Nathan Chancellor <nathan@kernel.org> wrote:
> > I was able to figure out that enabling CONFIG_CFI_CLANG was the culprit
> > for the change in behavior but it does not appear to be the root cause,
> > as I can get the same error with GCC and the following diff (which
> > happens with CFI_CLANG because of the CALL_OPS dependency):
...
> > -       select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS \
> > -               if DYNAMIC_FTRACE_WITH_ARGS && DYNAMIC_FTRACE_WITH_CALL_OPS
> >         select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS \
> >                 if (DYNAMIC_FTRACE_WITH_ARGS && !CFI_CLANG && \
> >                     (CC_IS_CLANG || !CC_OPTIMIZE_FOR_SIZE))
> >
...
> That's expected.
> See how kernel/bpf/trampoline.c is using DYNAMIC_FTRACE_WITH_DIRECT_CALLS.
> 
> Theoretically we can make bpf trampoline work without it,
> but why bother? Just enable this config.

As I note above, this is incompatible with CONFIG_CFI_CLANG, which is
more important for my particular area of testing and maintenance. Since
you note this is expected, I will just go back to ignoring the warning
in my kernel logs :) thank you for the quick response!

Cheers,
Nathan


  reply	other threads:[~2025-06-11  2:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 23:24 bpf-restrict-fs fails to load without DYNAMIC_FTRACE_WITH_DIRECT_CALLS on arm64 Nathan Chancellor
2025-06-10 23:37 ` Alexei Starovoitov
2025-06-11  2:05   ` Nathan Chancellor [this message]
2025-06-11  2:25     ` Alexei Starovoitov
2025-06-11  2:49       ` Nathan Chancellor

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=20250611020522.GA3981304@ax162 \
    --to=nathan@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).