]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: change bpf_probe_write_user to bpf_trace_printk in test_verifier
authorYonghong Song <yhs@fb.com>
Tue, 21 Nov 2017 19:23:40 +0000 (11:23 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 21 Nov 2017 20:23:05 +0000 (21:23 +0100)
commitf1a8b8e3d98b0b3d1d88d119f52cc85d05ab3189
tree9634bc10802301580cdb1c4771a04213de4d06df
parent6547f424be5d9d75c78c146ed6e9f71be1c43981
bpf: change bpf_probe_write_user to bpf_trace_printk in test_verifier

There are four tests in test_verifier using bpf_probe_write_user
helper. These four tests will emit the following kernel messages
  [   12.974753] test_verifier[220] is installing a program with bpf_probe_write_user
                                    helper that may corrupt user memory!
  [   12.979285] test_verifier[220] is installing a program with bpf_probe_write_user
                                    helper that may corrupt user memory!
  ......

This may confuse certain users. This patch replaces bpf_probe_write_user
with bpf_trace_printk. The test_verifier already uses bpf_trace_printk
earlier in the test and a trace_printk warning message has been printed.
So this patch does not emit any more kernel messages.

Fixes: b6ff63911232 ("bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_verifier.c