diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-02-27 12:06:28 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-02-27 12:06:28 +0100 |
| commit | 6ceee05ad984b5abd108b32cc04ae5045166f51c (patch) | |
| tree | 4408b4eb72052a8bce00f434fc8cb3e64e167903 | |
| parent | 64482eb94884b3d18789276e1fc7b4776a2e7c74 (diff) | |
prog: extend a TODO about big-endian hints
| -rw-r--r-- | prog/hints.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/prog/hints.go b/prog/hints.go index 9ea317cf8..69ba6c6ae 100644 --- a/prog/hints.go +++ b/prog/hints.go @@ -113,6 +113,10 @@ func checkConstArg(arg *ConstArg, compMap CompMap, exec func()) { func checkDataArg(arg *DataArg, compMap CompMap, exec func()) { // TODO(dvyukov): we need big-endian match for ANYBLOBs. + // TODO(dvyukov): any probably not just for ANYBLOBs. Consider that + // kernel code does not convert the data (i.e. not ntohs(pkt->proto) == ETH_P_BATMAN), + // but instead converts the constant (i.e. pkt->proto == htons(ETH_P_BATMAN)). + // In such case we will see dynamic operand that does not match what we have in the program. bytes := make([]byte, 8) data := arg.Data() size := len(data) |
