mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	bpf: clarify a misleading verifier error message
The current verifier error message states that tail_calls are not allowed in non-JITed programs with BPF-to-BPF calls. While this is accurate, it is not the only scenario where this restriction applies. Some architectures do not support this feature combination even when programs are JITed. This update improves the error message to better reflect these limitations. Suggested-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com> Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Link: https://lore.kernel.org/r/20250318083551.8192-1-andreaterzolo3@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
		
							parent
							
								
									6ca21620b4
								
							
						
					
					
						commit
						a2598045ea
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -9887,7 +9887,7 @@ static int check_map_func_compatibility(struct bpf_verifier_env *env,
 | 
			
		|||
		if (map->map_type != BPF_MAP_TYPE_PROG_ARRAY)
 | 
			
		||||
			goto error;
 | 
			
		||||
		if (env->subprog_cnt > 1 && !allow_tail_call_in_subprogs(env)) {
 | 
			
		||||
			verbose(env, "tail_calls are not allowed in non-JITed programs with bpf-to-bpf calls\n");
 | 
			
		||||
			verbose(env, "mixing of tail_calls and bpf-to-bpf calls is not supported\n");
 | 
			
		||||
			return -EINVAL;
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue