mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: George Guo <dongtai.guo@linux.dev>
To: yangtiezhu@loongson.cn
Cc: chenhuacai@kernel.org, hengqi.chen@gmail.com,
	loongarch@lists.linux.dev, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, George Guo <guodongtai@kylinos.cn>
Subject: Re: [PATCH v1 0/4] LoongArch: BPF: Support instructions array, indirect jumps and calls
Date: Thu,  3 Dec 2026 22:56:54 -0800	[thread overview]
Message-ID: <20261204065654.13835-1-dongtai.guo@linux.dev> (raw)
In-Reply-To: <20261123043907.20225-1-yangtiezhu@loongson.cn>

On 2026/11/23 12:39, Tiezhu Yang wrote:
> Tested with the series of BPF selftests, here are the test results:
>
> $ sudo ./test_progs -t bpf_insn_array | tail -1
> Summary: 1/20 PASSED, 0 SKIPPED, 0/0 FAILED
>
> $ sudo ./test_progs-cpuv4 -t gotox | tail -1
> Summary: 2/14 PASSED, 0 SKIPPED, 0/0 FAILED
>
> $ sudo ./test_progs -t callx | tail -1
> Summary: 6/89 PASSED, 6 SKIPPED, 0/0 FAILED

Tested the whole series on Loongson-3C6000. These tests are skipped on
LoongArch upstream, so I added LoongArch to the arch checks in
bpf_insn_array.c, callx_func_ptr_map.c, callx_rodata_lskel.c,
verifier_callx.c, verifier_callx_rodata.c and verifier_gotox.c locally:

  $ sudo ./test_progs -t bpf_insn_array | tail -1
  Summary: 1/20 PASSED, 0 SKIPPED, 0/0 FAILED

  $ sudo ./test_progs-cpuv4 -t gotox | tail -1
  Summary: 2/47 PASSED, 0 SKIPPED, 0/0 FAILED

  $ sudo ./test_progs -t jit_insns,jit_insns_blinded | tail -1
  Summary: 2/47 PASSED, 0 SKIPPED, 0/0 FAILED

With CONFIG_ARCH_STRICT_ALIGN=n:

  $ sudo ./test_progs -t callx | tail -1
  Summary: 4/77 PASSED, 0 SKIPPED, 0/0 FAILED

With CONFIG_ARCH_STRICT_ALIGN=y:

  $ sudo ./test_progs -t callx | tail -1
  Summary: 3/76 PASSED, 0 SKIPPED, 1/1 FAILED

The only failure with CONFIG_ARCH_STRICT_ALIGN=y is
verifier_callx_rodata/callx_rodata_misaligned_read, and it is not
related to this series. HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
then, so the verifier checks alignment strictly. The program is still
rejected as expected, but by the alignment check first:

  misaligned value access off 352+4 size 8

instead of the message the test looks for:

  read of 8 bytes at offset

Reviewed-by: George Guo <guodongtai@kylinos.cn>
Tested-by: George Guo <guodongtai@kylinos.cn>

Thanks,
George

  parent reply	other threads:[~2026-12-04  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  4:39 Tiezhu Yang
2026-11-23  4:39 ` [PATCH v1 1/4] LoongArch: BPF: Optimize BPF_CALL control flow Tiezhu Yang
2026-11-23  4:39 ` [PATCH v1 2/4] LoongArch: BPF: Add support for instructions array Tiezhu Yang
2026-11-23  4:39 ` [PATCH v1 3/4] LoongArch: BPF: Add support for indirect jumps Tiezhu Yang
2026-11-23  4:39 ` [PATCH v1 4/4] LoongArch: BPF: Add support for indirect calls Tiezhu Yang
2026-12-04  6:56 ` George Guo [this message]
2026-12-04  7:11   ` [PATCH v1 0/4] LoongArch: BPF: Support instructions array, indirect jumps and calls Tiezhu Yang

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=20261204065654.13835-1-dongtai.guo@linux.dev \
    --to=dongtai.guo@linux.dev \
    --cc=bpf@vger.kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=guodongtai@kylinos.cn \
    --cc=hengqi.chen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=yangtiezhu@loongson.cn \
    /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®