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: <5ca1d6a6-5e5a-3485-d3cd-f9439612d1f3@loongson.cn>
Date: Fri, 17 Oct 2025 18:05:09 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman <eddyz87@...il.com>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [selftests/bpf QUESTION] What is the proper way to fix the build
 error

Hi,

When compiling tools/testing/selftests/bpf, there is a build error:

   CLNG-BPF [test_progs] verifier_global_ptr_args.bpf.o
progs/verifier_global_ptr_args.c:228:5: error: redefinition of 'off' as 
different kind of symbol
   228 | u32 off;
       |     ^
/home/fedora/newfixbpf.git/tools/testing/selftests/bpf/tools/include/vmlinux.h:21409:2: 
note: previous definition is here
  21409 |         off = 0,
        |         ^
1 error generated.

tools/testing/selftests/bpf/tools/include/vmlinux.h:21409

enum i40e_ptp_gpio_pin_state {
         end = -2,
         invalid = -1,
         off = 0,
         in_A = 1,
         in_B = 2,
         out_A = 3,
         out_B = 4,
};

The previous definition of "off" is in
drivers/net/ethernet/intel/i40e/i40e_ptp.c:

enum i40e_ptp_gpio_pin_state {
	end = -2,
	invalid,
	off,
	in_A,
	in_B,
	out_A,
	out_B,
};

CONFIG_I40E is set in the defconfig file to build i40e_ptp.c after the
commit 032676ff8217 (LoongArch: Update Loongson-3 default config file)
in 6.18-rc1.

What is the proper way to fix the build error?
(1) just disable CONFIG_I40E (CONFIG_I40E=n), then no "off" in vmlinux.h
(2) set it as a module (CONFIG_I40E=m), then no "off" in vmlinux.h
(3) modify the variable name "off" in verifier_global_ptr_args.c

Thanks,
Tiezhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ