lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f34bd3ce377d9d89626c2df8fa584e0@208suo.com>
Date:   Wed, 14 Jun 2023 15:42:34 +0800
From:   wuyonggang001@...suo.com
To:     andrii@...nel.org, shuah@...nel.org
Cc:     bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] selftests/bpf: Fix the address is NULL

Fix the following coccicheck error:

tools/testing/selftests/bpf/progs/test_ksyms_weak.c:53:6-20: ERROR: test 
of a variable/field address

Signed-off-by: Yonggang Wu <wuyonggang001@...suo.com>
---
  tools/testing/selftests/bpf/progs/test_ksyms_weak.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c 
b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c
index d00268c91e19..768a4d6ee6f5 100644
--- a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c
+++ b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c
@@ -50,7 +50,7 @@ int pass_handler(const void *ctx)
      /* tests non-existent symbols. */
      out__non_existent_typed = (__u64)&bpf_link_fops2;

-    if (&bpf_link_fops2) /* can't happen */
+    if (&bpf_link_fops2 != NULL) /* can't happen */
          out__non_existent_typed = 
(__u64)bpf_per_cpu_ptr(&bpf_link_fops2, 0);

      if (!bpf_ksym_exists(bpf_task_acquire))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ