[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xdp-newbies
Subject:    Re: Contextually speaking...
From:       David Miller <davem () davemloft ! net>
Date:       2017-05-14 15:52:59
Message-ID: 20170514.115259.2132129698949658762.davem () davemloft ! net
[Download RAW message or body]

From: Vetoshkin Nikita <nikita.vetoshkin@gmail.com>
Date: Sun, 14 May 2017 07:16:45 +0000

> As I understand from a C compiler point of view ->data and ->data_end are
> just arbitrary pointers embedded in a struct. Where does this semantics
> arises from? I.e. how does eBPF verifier knows that data ends where
> data_end points to?

Please do not top-post.

When the program runs, the invocation point sets ->data to skb->data
and ->data_end to "skb->data + skb->len" or something similar.

The kernel is in full control of the values set there in the context,
and that's why the verifier may assume these properties.  The verifier
executes in the kernel where the semantics are guaranteed.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic