public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
       [not found] <20260307103949.2340104-2-xukuohai@huaweicloud.com>
@ 2026-03-07 17:08 ` kernel test robot
  2026-03-09  9:22   ` Xu Kuohai
  2026-03-07 17:23 ` kernel test robot
  1 sibling, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-03-07 17:08 UTC (permalink / raw)
  To: Xu Kuohai, bpf, linux-kernel, linux-arm-kernel
  Cc: llvm, oe-kbuild-all, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
	Yonghong Song, Puranjay Mohan, Anton Protopopov, Shahab Vahedi,
	Russell King, Tiezhu Yang, Hengqi Chen, Johan Almbladh,
	Paul Burton, Hari Bathini, Christophe Leroy, Naveen N Rao,
	Luke Nelson, Xi Wang, Björn Töpel, Pu Lehui,
	Ilya Leoshkevich, Heiko Carstens, Vasily Gorbik, David S . Miller,
	Wang YanQing

Hi Xu,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Xu-Kuohai/bpf-Move-constants-blinding-from-JIT-to-verifier/20260307-181538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20260307103949.2340104-2-xukuohai%40huaweicloud.com
patch subject: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260307/202603071836.igZbCyrE-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603071836.igZbCyrE-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603071836.igZbCyrE-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/verifier.c:23100:9: error: call to undeclared function 'bpf_jit_blind_constants'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    23100 |                 err = bpf_jit_blind_constants(env);
          |                       ^
   1 error generated.


vim +/bpf_jit_blind_constants +23100 kernel/bpf/verifier.c

 23087	
 23088	static int fixup_call_args(struct bpf_verifier_env *env)
 23089	{
 23090	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
 23091		struct bpf_prog *prog = env->prog;
 23092		struct bpf_insn *insn = prog->insnsi;
 23093		bool has_kfunc_call = bpf_prog_has_kfunc_call(prog);
 23094		int i, depth;
 23095	#endif
 23096		int err = 0;
 23097	
 23098		if (env->prog->jit_requested &&
 23099		    !bpf_prog_is_offloaded(env->prog->aux)) {
 23100			err = bpf_jit_blind_constants(env);
 23101			if (err)
 23102				return err;
 23103			err = jit_subprogs(env);
 23104			if (err == 0)
 23105				return 0;
 23106			if (err == -EFAULT)
 23107				return err;
 23108		}
 23109	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
 23110		if (has_kfunc_call) {
 23111			verbose(env, "calling kernel functions are not allowed in non-JITed programs\n");
 23112			return -EINVAL;
 23113		}
 23114		if (env->subprog_cnt > 1 && env->prog->aux->tail_call_reachable) {
 23115			/* When JIT fails the progs with bpf2bpf calls and tail_calls
 23116			 * have to be rejected, since interpreter doesn't support them yet.
 23117			 */
 23118			verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
 23119			return -EINVAL;
 23120		}
 23121		for (i = 0; i < prog->len; i++, insn++) {
 23122			if (bpf_pseudo_func(insn)) {
 23123				/* When JIT fails the progs with callback calls
 23124				 * have to be rejected, since interpreter doesn't support them yet.
 23125				 */
 23126				verbose(env, "callbacks are not allowed in non-JITed programs\n");
 23127				return -EINVAL;
 23128			}
 23129	
 23130			if (!bpf_pseudo_call(insn))
 23131				continue;
 23132			depth = get_callee_stack_depth(env, insn, i);
 23133			if (depth < 0)
 23134				return depth;
 23135			bpf_patch_call_args(insn, depth);
 23136		}
 23137		err = 0;
 23138	#endif
 23139		return err;
 23140	}
 23141	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
       [not found] <20260307103949.2340104-2-xukuohai@huaweicloud.com>
  2026-03-07 17:08 ` [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier kernel test robot
@ 2026-03-07 17:23 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-07 17:23 UTC (permalink / raw)
  To: Xu Kuohai, bpf, linux-kernel, linux-arm-kernel
  Cc: llvm, oe-kbuild-all, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
	Yonghong Song, Puranjay Mohan, Anton Protopopov, Shahab Vahedi,
	Russell King, Tiezhu Yang, Hengqi Chen, Johan Almbladh,
	Paul Burton, Hari Bathini, Christophe Leroy, Naveen N Rao,
	Luke Nelson, Xi Wang, Björn Töpel, Pu Lehui,
	Ilya Leoshkevich, Heiko Carstens, Vasily Gorbik, David S . Miller,
	Wang YanQing

Hi Xu,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Xu-Kuohai/bpf-Move-constants-blinding-from-JIT-to-verifier/20260307-181538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20260307103949.2340104-2-xukuohai%40huaweicloud.com
patch subject: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
config: riscv-randconfig-002-20260307 (https://download.01.org/0day-ci/archive/20260308/202603080126.Lh5uvLLo-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c32caeec8158d634bb71ab8911a6031248b9fc47)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260308/202603080126.Lh5uvLLo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603080126.Lh5uvLLo-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/verifier.c:23100:9: error: call to undeclared function 'bpf_jit_blind_constants'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    23100 |                 err = bpf_jit_blind_constants(env);
          |                       ^
   1 error generated.


vim +/bpf_jit_blind_constants +23100 kernel/bpf/verifier.c

 23087	
 23088	static int fixup_call_args(struct bpf_verifier_env *env)
 23089	{
 23090	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
 23091		struct bpf_prog *prog = env->prog;
 23092		struct bpf_insn *insn = prog->insnsi;
 23093		bool has_kfunc_call = bpf_prog_has_kfunc_call(prog);
 23094		int i, depth;
 23095	#endif
 23096		int err = 0;
 23097	
 23098		if (env->prog->jit_requested &&
 23099		    !bpf_prog_is_offloaded(env->prog->aux)) {
 23100			err = bpf_jit_blind_constants(env);
 23101			if (err)
 23102				return err;
 23103			err = jit_subprogs(env);
 23104			if (err == 0)
 23105				return 0;
 23106			if (err == -EFAULT)
 23107				return err;
 23108		}
 23109	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
 23110		if (has_kfunc_call) {
 23111			verbose(env, "calling kernel functions are not allowed in non-JITed programs\n");
 23112			return -EINVAL;
 23113		}
 23114		if (env->subprog_cnt > 1 && env->prog->aux->tail_call_reachable) {
 23115			/* When JIT fails the progs with bpf2bpf calls and tail_calls
 23116			 * have to be rejected, since interpreter doesn't support them yet.
 23117			 */
 23118			verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
 23119			return -EINVAL;
 23120		}
 23121		for (i = 0; i < prog->len; i++, insn++) {
 23122			if (bpf_pseudo_func(insn)) {
 23123				/* When JIT fails the progs with callback calls
 23124				 * have to be rejected, since interpreter doesn't support them yet.
 23125				 */
 23126				verbose(env, "callbacks are not allowed in non-JITed programs\n");
 23127				return -EINVAL;
 23128			}
 23129	
 23130			if (!bpf_pseudo_call(insn))
 23131				continue;
 23132			depth = get_callee_stack_depth(env, insn, i);
 23133			if (depth < 0)
 23134				return depth;
 23135			bpf_patch_call_args(insn, depth);
 23136		}
 23137		err = 0;
 23138	#endif
 23139		return err;
 23140	}
 23141	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
  2026-03-07 17:08 ` [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier kernel test robot
@ 2026-03-09  9:22   ` Xu Kuohai
  0 siblings, 0 replies; 3+ messages in thread
From: Xu Kuohai @ 2026-03-09  9:22 UTC (permalink / raw)
  To: kernel test robot, bpf, linux-kernel, linux-arm-kernel
  Cc: llvm, oe-kbuild-all, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
	Yonghong Song, Puranjay Mohan, Anton Protopopov, Shahab Vahedi,
	Russell King, Tiezhu Yang, Hengqi Chen, Johan Almbladh,
	Paul Burton, Hari Bathini, Christophe Leroy, Naveen N Rao,
	Luke Nelson, Xi Wang, Björn Töpel, Pu Lehui,
	Ilya Leoshkevich, Heiko Carstens, Vasily Gorbik, David S . Miller,
	Wang YanQing

On 3/8/2026 1:08 AM, kernel test robot wrote:
> Hi Xu,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on bpf-next/master]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Xu-Kuohai/bpf-Move-constants-blinding-from-JIT-to-verifier/20260307-181538
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> patch link:    https://lore.kernel.org/r/20260307103949.2340104-2-xukuohai%40huaweicloud.com
> patch subject: [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier
> config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260307/202603071836.igZbCyrE-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603071836.igZbCyrE-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603071836.igZbCyrE-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>>> kernel/bpf/verifier.c:23100:9: error: call to undeclared function 'bpf_jit_blind_constants'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      23100 |                 err = bpf_jit_blind_constants(env);
>            |                       ^
>     1 error generated.
>

oops, it's not defined when CONFIG_BPF_JIT is not enabled

> 
> vim +/bpf_jit_blind_constants +23100 kernel/bpf/verifier.c
> 
>   23087	
>   23088	static int fixup_call_args(struct bpf_verifier_env *env)
>   23089	{
>   23090	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
>   23091		struct bpf_prog *prog = env->prog;
>   23092		struct bpf_insn *insn = prog->insnsi;
>   23093		bool has_kfunc_call = bpf_prog_has_kfunc_call(prog);
>   23094		int i, depth;
>   23095	#endif
>   23096		int err = 0;
>   23097	
>   23098		if (env->prog->jit_requested &&
>   23099		    !bpf_prog_is_offloaded(env->prog->aux)) {
>   23100			err = bpf_jit_blind_constants(env);
>   23101			if (err)
>   23102				return err;
>   23103			err = jit_subprogs(env);
>   23104			if (err == 0)
>   23105				return 0;
>   23106			if (err == -EFAULT)
>   23107				return err;
>   23108		}
>   23109	#ifndef CONFIG_BPF_JIT_ALWAYS_ON
>   23110		if (has_kfunc_call) {
>   23111			verbose(env, "calling kernel functions are not allowed in non-JITed programs\n");
>   23112			return -EINVAL;
>   23113		}
>   23114		if (env->subprog_cnt > 1 && env->prog->aux->tail_call_reachable) {
>   23115			/* When JIT fails the progs with bpf2bpf calls and tail_calls
>   23116			 * have to be rejected, since interpreter doesn't support them yet.
>   23117			 */
>   23118			verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
>   23119			return -EINVAL;
>   23120		}
>   23121		for (i = 0; i < prog->len; i++, insn++) {
>   23122			if (bpf_pseudo_func(insn)) {
>   23123				/* When JIT fails the progs with callback calls
>   23124				 * have to be rejected, since interpreter doesn't support them yet.
>   23125				 */
>   23126				verbose(env, "callbacks are not allowed in non-JITed programs\n");
>   23127				return -EINVAL;
>   23128			}
>   23129	
>   23130			if (!bpf_pseudo_call(insn))
>   23131				continue;
>   23132			depth = get_callee_stack_depth(env, insn, i);
>   23133			if (depth < 0)
>   23134				return depth;
>   23135			bpf_patch_call_args(insn, depth);
>   23136		}
>   23137		err = 0;
>   23138	#endif
>   23139		return err;
>   23140	}
>   23141	
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-09  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260307103949.2340104-2-xukuohai@huaweicloud.com>
2026-03-07 17:08 ` [bpf-next v7 1/5] bpf: Move constants blinding from JIT to verifier kernel test robot
2026-03-09  9:22   ` Xu Kuohai
2026-03-07 17:23 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox