@@ -1584,6 +1584,25 @@ struct bpf_stream_stage {
15841584 int len ;
15851585};
15861586
1587+ struct call_aux_states {
1588+ int call_bpf_insn_idx ;
1589+ int jit_call_idx ;
1590+ u8 is_helper_kfunc ;
1591+ u8 is_bpf_loop ;
1592+ u8 is_bpf_loop_cb_inline ;
1593+ };
1594+
1595+ struct bpf_term_patch_call_sites {
1596+ u32 call_sites_cnt ;
1597+ struct call_aux_states * call_states ;
1598+ };
1599+
1600+ struct bpf_term_aux_states {
1601+ struct bpf_prog * prog ;
1602+ struct work_struct work ;
1603+ struct bpf_term_patch_call_sites * patch_call_sites ;
1604+ };
1605+
15871606struct bpf_prog_aux {
15881607 atomic64_t refcnt ;
15891608 u32 used_map_cnt ;
@@ -1618,6 +1637,7 @@ struct bpf_prog_aux {
16181637 bool tail_call_reachable ;
16191638 bool xdp_has_frags ;
16201639 bool exception_cb ;
1640+ bool is_bpf_loop_cb_non_inline ;
16211641 bool exception_boundary ;
16221642 bool is_extended ; /* true if extended by freplace program */
16231643 bool jits_use_priv_stack ;
@@ -1696,33 +1716,34 @@ struct bpf_prog_aux {
16961716};
16971717
16981718struct bpf_prog {
1699- u16 pages ; /* Number of allocated pages */
1700- u16 jited :1 , /* Is our filter JIT'ed? */
1701- jit_requested :1 ,/* archs need to JIT the prog */
1702- gpl_compatible :1 , /* Is filter GPL compatible? */
1703- cb_access :1 , /* Is control block accessed? */
1704- dst_needed :1 , /* Do we need dst entry? */
1705- blinding_requested :1 , /* needs constant blinding */
1706- blinded :1 , /* Was blinded */
1707- is_func :1 , /* program is a bpf function */
1708- kprobe_override :1 , /* Do we override a kprobe? */
1709- has_callchain_buf :1 , /* callchain buffer allocated? */
1710- enforce_expected_attach_type :1 , /* Enforce expected_attach_type checking at attach time */
1711- call_get_stack :1 , /* Do we call bpf_get_stack() or bpf_get_stackid() */
1712- call_get_func_ip :1 , /* Do we call get_func_ip() */
1713- tstamp_type_access :1 , /* Accessed __sk_buff->tstamp_type */
1714- sleepable :1 ; /* BPF program is sleepable */
1715- enum bpf_prog_type type ; /* Type of BPF program */
1716- enum bpf_attach_type expected_attach_type ; /* For some prog types */
1717- u32 len ; /* Number of filter blocks */
1718- u32 jited_len ; /* Size of jited insns in bytes */
1719- u8 tag [BPF_TAG_SIZE ];
1720- struct bpf_prog_stats __percpu * stats ;
1721- int __percpu * active ;
1722- unsigned int (* bpf_func )(const void * ctx ,
1723- const struct bpf_insn * insn );
1724- struct bpf_prog_aux * aux ; /* Auxiliary fields */
1725- struct sock_fprog_kern * orig_prog ; /* Original BPF program */
1719+ u16 pages ; /* Number of allocated pages */
1720+ u16 jited :1 , /* Is our filter JIT'ed? */
1721+ jit_requested :1 ,/* archs need to JIT the prog */
1722+ gpl_compatible :1 , /* Is filter GPL compatible? */
1723+ cb_access :1 , /* Is control block accessed? */
1724+ dst_needed :1 , /* Do we need dst entry? */
1725+ blinding_requested :1 , /* needs constant blinding */
1726+ blinded :1 , /* Was blinded */
1727+ is_func :1 , /* program is a bpf function */
1728+ kprobe_override :1 , /* Do we override a kprobe? */
1729+ has_callchain_buf :1 , /* callchain buffer allocated? */
1730+ enforce_expected_attach_type :1 , /* Enforce expected_attach_type checking at attach time */
1731+ call_get_stack :1 , /* Do we call bpf_get_stack() or bpf_get_stackid() */
1732+ call_get_func_ip :1 , /* Do we call get_func_ip() */
1733+ tstamp_type_access :1 , /* Accessed __sk_buff->tstamp_type */
1734+ sleepable :1 ; /* BPF program is sleepable */
1735+ enum bpf_prog_type type ; /* Type of BPF program */
1736+ enum bpf_attach_type expected_attach_type ; /* For some prog types */
1737+ u32 len ; /* Number of filter blocks */
1738+ u32 jited_len ; /* Size of jited insns in bytes */
1739+ u8 tag [BPF_TAG_SIZE ];
1740+ struct bpf_prog_stats __percpu * stats ;
1741+ int __percpu * active ;
1742+ unsigned int (* bpf_func )(const void * ctx ,
1743+ const struct bpf_insn * insn );
1744+ struct bpf_prog_aux * aux ; /* Auxiliary fields */
1745+ struct sock_fprog_kern * orig_prog ; /* Original BPF program */
1746+ struct bpf_term_aux_states * term_states ;
17261747 /* Instructions for interpreter */
17271748 union {
17281749 DECLARE_FLEX_ARRAY (struct sock_filter , insns );
0 commit comments