BPF List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Eduard Zingerman <eddyz87@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
	daniel@iogearbox.net, martin.lau@linux.dev, kernel-team@fb.com,
	yonghong.song@linux.dev, jemarch@gnu.org, thinker.li@gmail.com
Subject: Re: [PATCH bpf-next 0/5] check bpf_dummy_struct_ops program params for test runs
Date: Thu, 25 Apr 2024 19:50:30 +0000	[thread overview]
Message-ID: <171407463094.28735.7376670386813656850.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20240424012821.595216-1-eddyz87@gmail.com>

Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Tue, 23 Apr 2024 18:28:16 -0700 you wrote:
> When doing BPF_PROG_TEST_RUN for bpf_dummy_struct_ops programs,
> execution should be rejected when NULL is passed for non-nullable
> params, because for such params verifier assumes that such params are
> never NULL and thus might optimize out NULL checks.
> 
> This problem was reported by Jose E. Marchesi in off-list discussion.
> The code generated by GCC for dummy_st_ops_success/test_1() function
> differs from LLVM variant in a way that allows verifier to remove the
> NULL check. The test dummy_st_ops/dummy_init_ret_value actually sets
> the 'state' parameter to NULL, thus GCC-generated version of the test
> triggers NULL pointer dereference when BPF program is executed.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/5] bpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable
    https://git.kernel.org/bpf/bpf-next/c/1479eaff1f16
  - [bpf-next,2/5] selftests/bpf: adjust dummy_st_ops_success to detect additional error
    https://git.kernel.org/bpf/bpf-next/c/3b3b84aacb44
  - [bpf-next,3/5] selftests/bpf: do not pass NULL for non-nullable params in dummy_st_ops
    https://git.kernel.org/bpf/bpf-next/c/f612210d456a
  - [bpf-next,4/5] bpf: check bpf_dummy_struct_ops program params for test runs
    https://git.kernel.org/bpf/bpf-next/c/980ca8ceeae6
  - [bpf-next,5/5] selftests/bpf: dummy_st_ops should reject 0 for non-nullable params
    https://git.kernel.org/bpf/bpf-next/c/6a2d30d3c5bf

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      parent reply	other threads:[~2024-04-25 19:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  1:28 [PATCH bpf-next 0/5] check bpf_dummy_struct_ops program params for test runs Eduard Zingerman
2024-04-24  1:28 ` [PATCH bpf-next 1/5] bpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable Eduard Zingerman
2024-04-24  1:28 ` [PATCH bpf-next 2/5] selftests/bpf: adjust dummy_st_ops_success to detect additional error Eduard Zingerman
2024-04-24  1:28 ` [PATCH bpf-next 3/5] selftests/bpf: do not pass NULL for non-nullable params in dummy_st_ops Eduard Zingerman
2024-04-24  1:28 ` [PATCH bpf-next 4/5] bpf: check bpf_dummy_struct_ops program params for test runs Eduard Zingerman
2024-04-24  1:28 ` [PATCH bpf-next 5/5] selftests/bpf: dummy_st_ops should reject 0 for non-nullable params Eduard Zingerman
2024-04-25 19:50 ` patchwork-bot+netdevbpf [this message]

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=171407463094.28735.7376670386813656850.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=jemarch@gnu.org \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=thinker.li@gmail.com \
    --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