@@ -797,29 +797,6 @@ const struct bpf_func_proto bpf_task_pt_regs_proto = {
797797	.ret_btf_id 	=  & bpf_task_pt_regs_ids [0 ],
798798};
799799
800- BPF_CALL_2 (bpf_current_task_under_cgroup , struct  bpf_map  * , map , u32 , idx )
801- {
802- 	struct  bpf_array  * array  =  container_of (map , struct  bpf_array , map );
803- 	struct  cgroup  * cgrp ;
804- 
805- 	if  (unlikely (idx  >= array -> map .max_entries ))
806- 		return  - E2BIG ;
807- 
808- 	cgrp  =  READ_ONCE (array -> ptrs [idx ]);
809- 	if  (unlikely (!cgrp ))
810- 		return  - EAGAIN ;
811- 
812- 	return  task_under_cgroup_hierarchy (current , cgrp );
813- }
814- 
815- static  const  struct  bpf_func_proto  bpf_current_task_under_cgroup_proto  =  {
816- 	.func            =  bpf_current_task_under_cgroup ,
817- 	.gpl_only        =  false,
818- 	.ret_type        =  RET_INTEGER ,
819- 	.arg1_type       =  ARG_CONST_MAP_PTR ,
820- 	.arg2_type       =  ARG_ANYTHING ,
821- };
822- 
823800struct  send_signal_irq_work  {
824801	struct  irq_work  irq_work ;
825802	struct  task_struct  * task ;
@@ -1480,8 +1457,6 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
14801457		return  & bpf_get_numa_node_id_proto ;
14811458	case  BPF_FUNC_perf_event_read :
14821459		return  & bpf_perf_event_read_proto ;
1483- 	case  BPF_FUNC_current_task_under_cgroup :
1484- 		return  & bpf_current_task_under_cgroup_proto ;
14851460	case  BPF_FUNC_get_prandom_u32 :
14861461		return  & bpf_get_prandom_u32_proto ;
14871462	case  BPF_FUNC_probe_write_user :
@@ -1510,6 +1485,8 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
15101485		return  & bpf_cgrp_storage_get_proto ;
15111486	case  BPF_FUNC_cgrp_storage_delete :
15121487		return  & bpf_cgrp_storage_delete_proto ;
1488+ 	case  BPF_FUNC_current_task_under_cgroup :
1489+ 		return  & bpf_current_task_under_cgroup_proto ;
15131490#endif 
15141491	case  BPF_FUNC_send_signal :
15151492		return  & bpf_send_signal_proto ;
0 commit comments