From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AFC614D70C for ; Thu, 25 Apr 2024 19:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714074632; cv=none; b=bcgvHTHKzSAO1BWzrm/1zdlQedhzlU5E22l7ot9aECjD/JivNWzziNVuD8BW0rwkmWw0nRw+Fh57xfGP2RnY3LNuquJ7y/2jufFLAeUoYaQcvnshuj22AvhGjoBRYVdkDGwJbRe2BDZ0i4PZOaiIf2u+rqvKjXXl/01gpBjlMyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714074632; c=relaxed/simple; bh=VV3PY6opayO/q+FwDg/hwuD4iB8RJawr2+4f8DdDbrQ=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=EGx1ilf704llkBN1OytrD6eM38/MZ2jiiwhgZRRp5wK4Su7shmY4Bojtk4/TOSvsFYP0WtqlB1kH6jwJK8vdvGLCrGRKcQpKE/79Rvd2x36o+ER0V5BPHAzIrQH0iaOy2bqWUKXTG+IbFmbgnqD3F6vnQHCGNYT04ICK5s3drD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oY1n+3HH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oY1n+3HH" Received: by smtp.kernel.org (Postfix) with ESMTPS id 00E8AC113CC; Thu, 25 Apr 2024 19:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714074631; bh=VV3PY6opayO/q+FwDg/hwuD4iB8RJawr2+4f8DdDbrQ=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=oY1n+3HH1ICeqRHZumB+Jh5SpV6QNQUL0piMO3AtE973hoxfZScMJwnGWS6gwMImr s75h/sw+ZMVhu3VI1CDY3VrvFVaCMUaWN4cWopWJLzj/wqWWfbAPD9gJUIkwaYqWma b+zU0zCmnlYXnE9DrUG5Nt5WP0WMXDbSgI7NX4q0E3QKxoebMXe7fMNIlm/wIf+AfV 9FDf1ZJwBAa+yMeLtzu/G7VofMQDGcAsAz1lzw4teqwiJ3Wb0PCF6nWXkJKFh5VXI0 PNEVlMzkqw0y2vOz0orst8x7UosdG0d5GpqoOASuNiqAWhPfrMWjIRijpcFT4g7J5w 1nnvGf1bEbe8w== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id E8661C43140; Thu, 25 Apr 2024 19:50:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH bpf-next 0/5] check bpf_dummy_struct_ops program params for test runs From: patchwork-bot+netdevbpf@kernel.org Message-Id: <171407463094.28735.7376670386813656850.git-patchwork-notify@kernel.org> Date: Thu, 25 Apr 2024 19:50:30 +0000 References: <20240424012821.595216-1-eddyz87@gmail.com> In-Reply-To: <20240424012821.595216-1-eddyz87@gmail.com> To: Eduard Zingerman 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 Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : 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