Alexei Starovoitov 62d101d5f4 selftests/bpf: Fix map_kptr test.
The compiler is optimizing out majority of unref_ptr read/writes, so the test
wasn't testing much. For example, one could delete '__kptr' tag from
'struct prog_test_ref_kfunc __kptr *unref_ptr;' and the test would still "pass".

Convert it to volatile stores. Confirmed by comparing bpf asm before/after.

Fixes: 2cbc469a6fc3 ("selftests/bpf: Add C tests for kptr")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20230214235051.22938-1-alexei.starovoitov@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-02-15 09:24:59 -08:00
..
2022-08-25 11:35:37 -07:00
2022-08-25 11:35:37 -07:00
2023-01-28 12:30:09 -08:00
2023-02-15 09:24:59 -08:00
2020-10-09 22:03:06 +02:00
2020-10-09 22:03:06 +02:00
2020-10-09 22:03:06 +02:00
2023-02-13 19:40:53 -08:00
2022-11-20 15:45:48 -08:00