linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] bpf: Fix a umin > umax reg bound error
@ 2023-03-14 20:34 Xu Kuohai
  2023-03-14 20:34 ` [PATCH bpf-next v2 1/2] " Xu Kuohai
  2023-03-14 20:34 ` [PATCH bpf-next v2 2/2] selftests/bpf: check bounds not in the 32-bit range Xu Kuohai
  0 siblings, 2 replies; 7+ messages in thread
From: Xu Kuohai @ 2023-03-14 20:34 UTC (permalink / raw)
  To: bpf, linux-kselftest, linux-kernel
  Cc: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Mykola Lysenko,
	Shuah Khan

From: Xu Kuohai <xukuohai@huawei.com>

This patchset fixes a umin > umax reg bound error and adds cases for it.

v2:
1. add bound check to avoid min > max 
2. update 32-bit reg min/max when 64-bit reg value is a constant
3. add Fixes tag

v1: https://lore.kernel.org/bpf/20230307220449.2933650-1-xukuohai@huaweicloud.com/

Xu Kuohai (2):
  bpf: Fix a umin > umax reg bound error
  selftests/bpf: check bounds not in the 32-bit range

 kernel/bpf/verifier.c                         | 143 ++++++++++++------
 tools/testing/selftests/bpf/verifier/bounds.c | 121 +++++++++++++++
 2 files changed, 214 insertions(+), 50 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-21  8:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 20:34 [PATCH bpf-next v2 0/2] bpf: Fix a umin > umax reg bound error Xu Kuohai
2023-03-14 20:34 ` [PATCH bpf-next v2 1/2] " Xu Kuohai
2023-03-17 22:24   ` Daniel Borkmann
2023-03-20 16:42     ` Daniel Borkmann
2023-03-21  8:28       ` Xu Kuohai
2023-03-21  8:06     ` Xu Kuohai
2023-03-14 20:34 ` [PATCH bpf-next v2 2/2] selftests/bpf: check bounds not in the 32-bit range Xu Kuohai

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).