Files
OrangePi_CM5/include/uapi/linux
Martin KaFai Lau bd5f5f4ecb bpf: Add BPF_MAP_GET_FD_BY_ID
Add BPF_MAP_GET_FD_BY_ID command to allow user to get a fd
from a bpf_map's ID.

bpf_map_inc_not_zero() is added and is called with map_idr_lock
held.

__bpf_map_put() is also added which has the 'bool do_idr_lock'
param to decide if the map_idr_lock should be acquired when
freeing the map->id.

In the error path of bpf_map_inc_not_zero(), it may have to
call __bpf_map_put(map, false) which does not need
to take the map_idr_lock when freeing the map->id.

It is currently limited to CAP_SYS_ADMIN which we can
consider to lift it in followup patches.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-06 15:41:23 -04:00
..
…
2017-05-17 11:53:02 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-10-18 10:05:42 -06:00
2017-06-06 15:41:23 -04:00
…
…
…
2017-03-03 07:24:00 -03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-10-01 07:32:32 +02:00
…
2015-12-14 12:19:37 -06:00
…
2017-03-25 20:11:19 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
2017-04-24 12:35:56 -04:00
…
2017-01-10 14:05:11 -05:00
…
…
…
…
…
…
…
…
…
…
2017-02-03 15:16:45 -05:00
2016-11-03 15:41:11 -04:00
2016-11-03 15:41:11 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-03-22 15:36:02 -07:00
…
…
2016-06-27 16:31:25 +01:00
…
…
…
…
…
…
…
…
…
2017-01-17 14:38:43 -05:00
…
…
…
…
…
…
…
2017-02-20 11:13:37 -05:00
…
…
…
…
…
2016-05-17 17:14:21 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2016-09-27 21:52:00 -04:00
2016-09-27 21:52:00 -04:00
…
…
…
2016-04-26 12:00:48 -04:00
…
…
…
…
…
…
…
…
…
…
…
2017-01-09 16:07:38 -05:00
…
2016-04-04 22:11:20 -04:00
…
…
…
…
…
…
2017-01-29 19:17:23 -05:00
2017-03-09 15:42:33 +01:00
…
…
…
2017-01-10 18:31:55 -08:00
…
…
…
…
…
…
2015-12-18 17:48:51 -08:00
…
…
…
2015-10-27 18:55:31 -07:00
…
…
2016-05-20 17:58:30 -07:00
…
2017-03-31 12:55:06 +02:00
2016-12-16 00:13:38 +02:00
2016-12-16 00:13:32 +02:00
2017-04-24 12:35:56 -04:00
2016-04-30 09:26:55 -07:00
…
…
…
…
…