• Yonghong Song's avatar
    bpf: change bpf_probe_write_user to bpf_trace_printk in test_verifier · f1a8b8e3
    Yonghong Song authored
    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: b6ff6391 ("bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change")
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    f1a8b8e3
test_verifier.c 250 KB