verifier.c (3d886aa3be15439e05784ac1cbd4acc2f13c0048) | verifier.c (546ac1ffb70d25b56c1126940e5ec639c4dd7413) |
---|---|
1/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 2 * Copyright (c) 2016 Facebook 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of version 2 of the GNU General Public 6 * License as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 1262 unchanged lines hidden (view full) --- 1271 if (func_id != BPF_FUNC_get_stackid) 1272 goto error; 1273 break; 1274 case BPF_MAP_TYPE_CGROUP_ARRAY: 1275 if (func_id != BPF_FUNC_skb_under_cgroup && 1276 func_id != BPF_FUNC_current_task_under_cgroup) 1277 goto error; 1278 break; | 1/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com 2 * Copyright (c) 2016 Facebook 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of version 2 of the GNU General Public 6 * License as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 1262 unchanged lines hidden (view full) --- 1271 if (func_id != BPF_FUNC_get_stackid) 1272 goto error; 1273 break; 1274 case BPF_MAP_TYPE_CGROUP_ARRAY: 1275 if (func_id != BPF_FUNC_skb_under_cgroup && 1276 func_id != BPF_FUNC_current_task_under_cgroup) 1277 goto error; 1278 break; |
1279 /* devmap returns a pointer to a live net_device ifindex that we cannot 1280 * allow to be modified from bpf side. So do not allow lookup elements 1281 * for now. 1282 */ 1283 case BPF_MAP_TYPE_DEVMAP: 1284 if (func_id == BPF_FUNC_map_lookup_elem) 1285 goto error; 1286 break; |
|
1279 case BPF_MAP_TYPE_ARRAY_OF_MAPS: 1280 case BPF_MAP_TYPE_HASH_OF_MAPS: 1281 if (func_id != BPF_FUNC_map_lookup_elem) 1282 goto error; 1283 default: 1284 break; 1285 } 1286 --- 2553 unchanged lines hidden --- | 1287 case BPF_MAP_TYPE_ARRAY_OF_MAPS: 1288 case BPF_MAP_TYPE_HASH_OF_MAPS: 1289 if (func_id != BPF_FUNC_map_lookup_elem) 1290 goto error; 1291 default: 1292 break; 1293 } 1294 --- 2553 unchanged lines hidden --- |