Netdev Archive on lore.kernel.org help / color / mirror / Atom feed
From: Johan Almbladh <johan.almbladh@anyfinetworks.com> To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, iii@linux.ibm.com Cc: kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Johan Almbladh <johan.almbladh@anyfinetworks.com> Subject: [PATCH bpf-next 08/13] bpf/tests: Add test case flag for verifier zero-extension Date: Thu, 2 Sep 2021 20:52:24 +0200 [thread overview] Message-ID: <20210902185229.1840281-9-johan.almbladh@anyfinetworks.com> (raw) In-Reply-To: <20210902185229.1840281-1-johan.almbladh@anyfinetworks.com> This patch adds a new flag to indicate that the verified did insert zero-extensions, even though the verifier is not being run for any of the tests. Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> --- lib/test_bpf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 3af8421ceb94..183ead9445ba 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -52,6 +52,7 @@ #define FLAG_NO_DATA BIT(0) #define FLAG_EXPECTED_FAIL BIT(1) #define FLAG_SKB_FRAG BIT(2) +#define FLAG_VERIFIER_ZEXT BIT(3) enum { CLASSIC = BIT(6), /* Old BPF instructions only. */ @@ -11278,6 +11279,8 @@ static struct bpf_prog *generate_filter(int which, int *err) fp->type = BPF_PROG_TYPE_SOCKET_FILTER; memcpy(fp->insnsi, fptr, fp->len * sizeof(struct bpf_insn)); fp->aux->stack_depth = tests[which].stack_depth; + fp->aux->verifier_zext = !!(tests[which].aux & + FLAG_VERIFIER_ZEXT); /* We cannot error here as we don't need type compatibility * checks. -- 2.25.1
next prev parent reply other threads:[~2021-09-02 18:53 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-02 18:52 [PATCH bpf-next 00/13] bpf/tests: Extend JIT test suite coverage Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 01/13] bpf/tests: Allow different number of runs per test case Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 02/13] bpf/tests: Reduce memory footprint of test suite Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 03/13] bpf/tests: Add exhaustive tests of ALU shift values Johan Almbladh 2021-09-03 6:39 ` kernel test robot 2021-09-02 18:52 ` [PATCH bpf-next 04/13] bpf/tests: Add exhaustive tests of ALU operand magnitudes Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 05/13] bpf/tests: Add exhaustive tests of JMP " Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 06/13] bpf/tests: Add staggered JMP and JMP32 tests Johan Almbladh 2021-09-03 8:22 ` Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 07/13] bpf/tests: Add exhaustive test of LD_IMM64 immediate magnitudes Johan Almbladh 2021-09-02 18:52 ` Johan Almbladh [this message] 2021-09-02 18:52 ` [PATCH bpf-next 09/13] bpf/tests: Add JMP tests with small offsets Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 10/13] bpf/tests: Add JMP tests with degenerate conditional Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 11/13] bpf/tests: Expand branch conversion JIT test Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 12/13] bpf/tests: Add more BPF_END byte order conversion tests Johan Almbladh 2021-09-02 18:52 ` [PATCH bpf-next 13/13] bpf/tests: Add tail call limit test with external function call Johan Almbladh
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=20210902185229.1840281-9-johan.almbladh@anyfinetworks.com \ --to=johan.almbladh@anyfinetworks.com \ --cc=andrii@kernel.org \ --cc=ast@kernel.org \ --cc=bpf@vger.kernel.org \ --cc=daniel@iogearbox.net \ --cc=iii@linux.ibm.com \ --cc=john.fastabend@gmail.com \ --cc=kafai@fb.com \ --cc=kpsingh@kernel.org \ --cc=netdev@vger.kernel.org \ --cc=songliubraving@fb.com \ --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: linkBe 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).