All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: "Alexei Starovoitov" <ast@kernel.org>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	bpf@vger.kernel.org, "Martin KaFai Lau" <kafai@fb.com>,
	"Song Liu" <songliubraving@fb.com>, "Yonghong Song" <yhs@fb.com>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"KP Singh" <kpsingh@chromium.org>,
	"Stanislav Fomichev" <sdf@google.com>,
	"Hao Luo" <haoluo@google.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Björn Töpel" <bjorn@kernel.org>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>
Subject: Re: [PATCH bpf-next 0/2] bpf,ftrace: bpf dispatcher function fix
Date: Tue, 30 Aug 2022 15:48:58 +0200	[thread overview]
Message-ID: <Yw4VSr7X8hacimrB@krava> (raw)
In-Reply-To: <9099057e-124c-8f30-c29d-54be85eeebfd@iogearbox.net>

On Tue, Aug 30, 2022 at 12:25:25AM +0200, Daniel Borkmann wrote:
> On 8/26/22 8:46 PM, Jiri Olsa wrote:
> > hi,
> > as discussed [1] sending fix that moves bpf dispatcher function of out
> > ftrace locations together with Peter's HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
> > dependency change.
> 
> Looks like the series breaks s390x builds; BPF CI link:
> 
> https://github.com/kernel-patches/bpf/runs/8079411784?check_suite_focus=true
> 
>   [...]
>     CC      net/xfrm/xfrm_state.o
>     CC      net/packet/af_packet.o
>   {standard input}: Assembler messages:
>   {standard input}:16055: Error: bad expression
>   {standard input}:16056: Error: bad expression
>   {standard input}:16057: Error: bad expression
>   {standard input}:16058: Error: bad expression
>   {standard input}:16059: Error: bad expression
>     CC      drivers/s390/char/raw3270.o
>     CC      net/ipv6/ip6_output.o
>   [...]
>     CC      net/xfrm/xfrm_output.o
>     CC      net/ipv6/ip6_input.o
>   {standard input}:16055: Error: invalid operands (*ABS* and *UND* sections) for `%'
>   {standard input}:16056: Error: invalid operands (*ABS* and *UND* sections) for `%'
>   {standard input}:16057: Error: invalid operands (*ABS* and *UND* sections) for `%'
>   {standard input}:16058: Error: invalid operands (*ABS* and *UND* sections) for `%'
>   {standard input}:16059: Error: invalid operands (*ABS* and *UND* sections) for `%'
>   make[3]: *** [scripts/Makefile.build:249: net/core/filter.o] Error 1
>   make[2]: *** [scripts/Makefile.build:465: net/core] Error 2
>   make[2]: *** Waiting for unfinished jobs....
>     CC      net/ipv4/tcp_fastopen.o
>   [...]
>     CC      lib/percpu-refcount.o
>   make[1]: *** [Makefile:1855: net] Error 2
>     CC      lib/rhashtable.o
>   make[1]: *** Waiting for unfinished jobs....
>     CC      lib/base64.o
>   [...]
>     AR      lib/built-in.a
>     CC      kernel/kheaders.o
>     AR      kernel/built-in.a
>   make: *** [Makefile:353: __build_one_by_one] Error 2
>   Error: Process completed with exit code 2.


it does not break on my cross build with gcc 12, but I can
reproduce with gcc 8 (CI seems to be on gcc 9)

the problem seems to be wrong assembler code with extra '%'
that's generated for patchable_function_entry(5)

gcc 8 generates:

.LPFE1:
        nopr    %%r0
        nopr    %%r0
        nopr    %%r0
        nopr    %%r0
        nopr    %%r0

and gcc 12 generates:

.LPFE1:
        nopr    %r0
        nopr    %r0
        nopr    %r0
        nopr    %r0
        nopr    %r0

perhaps we need to upgrade gcc in CI? cc-ing Ilya, any idea?

thanks,
jirka

> 
> > [1] https://lore.kernel.org/bpf/20220722110811.124515-1-jolsa@kernel.org/
> > ---
> > Jiri Olsa (1):
> >        bpf: Move bpf_dispatcher function out of ftrace locations
> > 
> > Peter Zijlstra (Intel) (1):
> >        ftrace: Add HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
> > 
> >   arch/x86/Kconfig                  |  1 +
> >   include/asm-generic/vmlinux.lds.h | 11 ++++++++++-
> >   include/linux/bpf.h               |  2 ++
> >   kernel/trace/Kconfig              |  6 ++++++
> >   tools/objtool/check.c             |  3 ++-
> >   5 files changed, 21 insertions(+), 2 deletions(-)
> > 
> 

  reply	other threads:[~2022-08-30 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 18:46 [PATCH bpf-next 0/2] bpf,ftrace: bpf dispatcher function fix Jiri Olsa
2022-08-26 18:46 ` [PATCH bpf-next 1/2] ftrace: Add HAVE_DYNAMIC_FTRACE_NO_PATCHABLE Jiri Olsa
2022-08-26 18:46 ` [PATCH bpf-next 2/2] bpf: Move bpf_dispatcher function out of ftrace locations Jiri Olsa
2022-08-28 23:01   ` KP Singh
2022-08-30 10:44   ` Peter Zijlstra
2022-08-30 13:29     ` Jiri Olsa
2022-08-29 22:25 ` [PATCH bpf-next 0/2] bpf,ftrace: bpf dispatcher function fix Daniel Borkmann
2022-08-30 13:48   ` Jiri Olsa [this message]
2022-08-30 16:46     ` Ilya Leoshkevich
2022-08-30 23:46       ` Ilya Leoshkevich
2022-08-31 10:00         ` Jiri Olsa

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=Yw4VSr7X8hacimrB@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=iii@linux.ibm.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=peterz@infradead.org \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=tglx@linutronix.de \
    --cc=yhs@fb.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.