另一种方法是使用 bpf_skb_pull_data 拉入一次非线性部分,然后重新测试并最终访问数据。 同时,这也保证了skb是未克隆的,这是direct write的必要条件。由于这仅需要是写入部分的不变量,因此验证程序检测写入并添加一个调用 bpf_skb_pull_data 的prologue,以从一开始就有效地取消克隆 skb,以防
At the same time, this also makes sure the skb is uncloned, which is a necessary condition for direct write. As this needs to be an invariant for the write part only, the verifier detects writes and adds a prologue that is calling bpf_skb_pull_data() to effectively unclone the skb f...
最后使用bpf_skb_pull_data彻底解决问题,其在man文档中解释如下: •Pull in non-linear data in case the skb is non-linear and not all of len are part of the linear section. Make len bytes from skb readable and writable. If a zero value is passed for len, then the whole length of the...
最后使用bpf_skb_pull_data彻底解决问题,其在man文档中解释如下: Pull in non-linear data in case the skb is non-linear and not all of len are part of the linear section. Make len bytes from skb readable and writable. If a zero value is passed for len, then the whole len...
此Pull Request 需要通过一些审核项 类型指派人员状态 审查 Xie XiuQi zhengzengkai zhangchangzhong sanglipeng 已完成(0/0人) ci-robot关联了src-openeuler/kernel Issue IBEANH1月17日 14:55 展开全部操作日志 ci-robot指派了zhengzengkai参与评审1月17日 14:55 ...
bpf_skb_load_bytes helper是访问数据的第一个解决方案。另一种方法是使用 bpf_skb_pull_data 拉入一次非线性部分,然后重新测试并最终访问数据。•同时,这也保证了skb是未克隆的,这是direct write的必要条件。由于这仅需要是写入部分的不变量,因此验证程序检测写入并添加一个调用 bpf_skb_pull_data 的prologue,...
bpf_skb_load_bytes helper是访问数据的第一个解决方案。另一种方法是使用 bpf_skb_pull_data 拉入一次非线性部分,然后重新测试并最终访问数据。•同时,这也保证了skb是未克隆的,这是direct write的必要条件。由于这仅需要是写入部分的不变量,因此验证程序检测写入并添加一个调用 bpf_skb_pull_data 的prologue,...