On Fri, Aug 25, 2017 at 4:28 AM, 周小明 via iovisor-dev <
[email protected]> wrote:

> Now i want to modify something of the skb with the ebpf in the prog_type
> kprobe.
> However, the help function `bpf_skb_store_bytes` is not supported with the
> prog_type BPF_PROG_TYPE_KPROBE.
> I test it with the error `unknow func`
>
> And I want to ask is there a way to modify skb  with ebpf in kprobe
> prog_type.
>

The eBPF virtual machine cannot write to kernel memory when attached
to kprobes. To use bpf_skb_store_bytes, you want a program of type
BPF_PROG_TYPE_SCHED_CLS or BPF_PROG_TYPE_SCHED_ACT.

>
>
> _______________________________________________
> iovisor-dev mailing list
> [email protected]
> https://lists.iovisor.org/mailman/listinfo/iovisor-dev
>
>
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to