public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10 0/3] fix build error in bpf selftests
@ 2022-08-01  7:29 Tianchen Ding
  2022-08-01  7:29 ` [PATCH 5.10 1/3] bpf: Consolidate shared test timing code Tianchen Ding
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tianchen Ding @ 2022-08-01  7:29 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin
  Cc: Lorenz Bauer, Alexei Starovoitov, linux-kernel, stable

We found a compile error when building tools/testing/selftests/bpf/ on 5.10.y.
tools/testing/selftests/bpf/prog_tests/sk_lookup.c:1092:15: error: 'struct bpf_sk_lookup' has no member named 'cookie'
 1092 |  if (CHECK(ctx.cookie == 0, "ctx.cookie", "no socket selected\n"))
      |               ^

To fix this bug, this patchset backports three patches from upstream:
https://lore.kernel.org/bpf/20210303101816.36774-1-lmb@cloudflare.com/

Patch 1 and 2 are necessary for bpf selftests build pass on 5.10.y.
Patch 3 does not impact building stage, but can avoid a test case
failure (by skipping it).

Lorenz Bauer (3):
  bpf: Consolidate shared test timing code
  bpf: Add PROG_TEST_RUN support for sk_lookup programs
  selftests: bpf: Don't run sk_lookup in verifier tests

 include/linux/bpf.h                           |  10 +
 include/uapi/linux/bpf.h                      |   5 +-
 net/bpf/test_run.c                            | 243 +++++++++++++-----
 net/core/filter.c                             |   1 +
 tools/include/uapi/linux/bpf.h                |   5 +-
 tools/testing/selftests/bpf/test_verifier.c   |   4 +-
 .../selftests/bpf/verifier/ctx_sk_lookup.c    |   1 +
 7 files changed, 204 insertions(+), 65 deletions(-)

-- 
2.27.0


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

end of thread, other threads:[~2022-08-01  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01  7:29 [PATCH 5.10 0/3] fix build error in bpf selftests Tianchen Ding
2022-08-01  7:29 ` [PATCH 5.10 1/3] bpf: Consolidate shared test timing code Tianchen Ding
2022-08-01  7:29 ` [PATCH 5.10 2/3] bpf: Add PROG_TEST_RUN support for sk_lookup programs Tianchen Ding
2022-08-01  7:29 ` [PATCH 5.10 3/3] selftests: bpf: Don't run sk_lookup in verifier tests Tianchen Ding
2022-08-01  8:51 ` [PATCH 5.10 0/3] fix build error in bpf selftests Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox