BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	kernel-team@fb.com, yonghong.song@linux.dev,
	Eduard Zingerman <eddyz87@gmail.com>
Subject: [PATCH bpf-next 0/3] follow up for __jited test tag
Date: Fri, 23 Aug 2024 01:06:41 -0700	[thread overview]
Message-ID: <20240823080644.263943-1-eddyz87@gmail.com> (raw)

This patch-set is a collection of follow-ups for
"__jited test tag to check disassembly after jit" series (see [1]).

First patch is most important:
as it turns out, I broke all test_loader based tests for s390 CI.
E.g. see log [2] for s390 execution of test_progs,
note all 'verivier_*' tests being skipped.
This happens because of incorrect handling of corner case when
get_current_arch() does not know which architecture to return.

Second patch makes matching of function return sequence in
verifier_tailcall_jit more flexible:

    -__jited("	retq")
    +__jited("	{{(retq|jmp	0x)}}")

The difference could be seen with and w/o mitigations=off boot
parameter for test VM (CI runs with mitigations=off, hence it
generates retq).

Third patch addresses Alexei's request to add #define and a comment in
jit_disasm_helpers.c.

[1] https://lore.kernel.org/bpf/20240820102357.3372779-1-eddyz87@gmail.com/
[2] https://github.com/kernel-patches/bpf/actions/runs/10518445973/job/29144511595

Eduard Zingerman (3):
  selftests/bpf: test_loader.c:get_current_arch() should not return 0
  selftests/bpf: match both retq/rethunk in verifier_tailcall_jit
  selftests/bpf: #define LOCAL_LABEL_LEN for jit_disasm_helpers.c

 .../testing/selftests/bpf/jit_disasm_helpers.c  | 17 ++++++++++++++---
 .../selftests/bpf/progs/verifier_tailcall_jit.c |  4 ++--
 tools/testing/selftests/bpf/test_loader.c       |  9 +++++----
 3 files changed, 21 insertions(+), 9 deletions(-)

-- 
2.46.0


             reply	other threads:[~2024-08-23  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  8:06 Eduard Zingerman [this message]
2024-08-23  8:06 ` [PATCH bpf-next 1/3] selftests/bpf: test_loader.c:get_current_arch() should not return 0 Eduard Zingerman
2024-08-23  8:06 ` [PATCH bpf-next 2/3] selftests/bpf: match both retq/rethunk in verifier_tailcall_jit Eduard Zingerman
2024-08-23  8:06 ` [PATCH bpf-next 3/3] selftests/bpf: #define LOCAL_LABEL_LEN for jit_disasm_helpers.c Eduard Zingerman
2024-08-23 14:40 ` [PATCH bpf-next 0/3] follow up for __jited test tag patchwork-bot+netdevbpf

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=20240823080644.263943-1-eddyz87@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --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