@@ -9042,7 +9042,7 @@ static bool sock_filter_is_valid_access(int off, int size,
90429042 prog -> expected_attach_type );
90439043}
90449044
9045- static int bpf_noop_prologue (struct bpf_insn * insn_buf , bool direct_write ,
9045+ static int bpf_noop_prologue (struct bpf_insn * insn_buf , u32 pkt_access_flags ,
90469046 const struct bpf_prog * prog )
90479047{
90489048 /* Neither direct read nor direct write requires any preliminary
@@ -9051,12 +9051,12 @@ static int bpf_noop_prologue(struct bpf_insn *insn_buf, bool direct_write,
90519051 return 0 ;
90529052}
90539053
9054- static int bpf_unclone_prologue (struct bpf_insn * insn_buf , bool direct_write ,
9054+ static int bpf_unclone_prologue (struct bpf_insn * insn_buf , u32 pkt_access_flags ,
90559055 const struct bpf_prog * prog , int drop_verdict )
90569056{
90579057 struct bpf_insn * insn = insn_buf ;
90589058
9059- if (!direct_write )
9059+ if (!( pkt_access_flags & PA_F_DIRECT_WRITE ) )
90609060 return 0 ;
90619061
90629062 /* if (!skb->cloned)
@@ -9125,10 +9125,11 @@ static int bpf_gen_ld_abs(const struct bpf_insn *orig,
91259125 return insn - insn_buf ;
91269126}
91279127
9128- static int tc_cls_act_prologue (struct bpf_insn * insn_buf , bool direct_write ,
9128+ static int tc_cls_act_prologue (struct bpf_insn * insn_buf , u32 pkt_access_flags ,
91299129 const struct bpf_prog * prog )
91309130{
9131- return bpf_unclone_prologue (insn_buf , direct_write , prog , TC_ACT_SHOT );
9131+ return bpf_unclone_prologue (insn_buf , pkt_access_flags , prog ,
9132+ TC_ACT_SHOT );
91329133}
91339134
91349135static bool tc_cls_act_is_valid_access (int off , int size ,
@@ -9466,10 +9467,10 @@ static bool sock_ops_is_valid_access(int off, int size,
94669467 return true;
94679468}
94689469
9469- static int sk_skb_prologue (struct bpf_insn * insn_buf , bool direct_write ,
9470+ static int sk_skb_prologue (struct bpf_insn * insn_buf , u32 pkt_access_flags ,
94709471 const struct bpf_prog * prog )
94719472{
9472- return bpf_unclone_prologue (insn_buf , direct_write , prog , SK_DROP );
9473+ return bpf_unclone_prologue (insn_buf , pkt_access_flags , prog , SK_DROP );
94739474}
94749475
94759476static bool sk_skb_is_valid_access (int off , int size ,
0 commit comments