Martin KaFai Lau
b16d9aa4c2
bpf: Add BPF_PROG_GET_FD_BY_ID
...
Add BPF_PROG_GET_FD_BY_ID command to allow user to get a fd
from a bpf_prog's ID.
bpf_prog_inc_not_zero() is added and is called with prog_idr_lock
held.
__bpf_prog_put() is also added which has the 'bool do_idr_lock'
param to decide if the prog_idr_lock should be acquired when
freeing the prog->id.
In the error path of bpf_prog_inc_not_zero(), it may have to
call __bpf_prog_put(map, false) which does not need
to take the prog_idr_lock when freeing the prog->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-06-06 15:41:23 -04:00
2017-05-01 13:52:24 -07:00
2017-02-27 18:43:46 -08:00
2017-03-02 08:42:34 +01:00
2017-06-04 21:58:01 -04:00
2017-05-12 15:57:15 -07:00
2017-05-21 11:45:26 -07:00
2017-05-01 21:49:28 +02:00
2017-05-10 10:30:46 -07:00
2017-05-22 20:32:05 +02:00
2017-05-08 18:49:23 -07:00
2017-05-10 10:30:46 -07:00
2017-05-22 20:28:22 +02:00
2017-05-12 15:57:15 -07:00
2017-06-04 21:58:01 -04:00
2017-03-02 08:42:39 +01:00
2017-05-03 11:05:15 -07:00
2017-05-03 11:05:15 -07:00
2017-05-03 11:05:15 -07:00
2017-05-03 09:21:59 -07:00
2017-05-02 10:16:05 -04:00
2017-05-02 10:16:05 -04:00
2017-05-03 11:05:15 -07:00
2017-01-12 07:01:56 -07:00
2017-04-14 21:49:56 +02:00
2016-12-24 11:46:01 -08:00
2017-04-14 10:29:40 +02:00
2017-05-08 17:15:11 -07:00
2017-03-02 08:42:28 +01:00
2017-03-02 08:42:39 +01:00
2017-03-09 17:01:09 -08:00
2017-02-22 10:15:09 -08:00
2017-05-13 17:26:02 -05:00
2016-12-24 11:46:01 -08:00
2017-04-15 16:03:46 +02:00
2017-05-08 17:15:13 -07:00
2017-05-08 17:15:10 -07:00
2017-02-27 13:26:17 -08:00
2017-02-17 13:40:05 -05:00
2016-10-25 11:31:51 +02:00
2017-05-08 17:15:12 -07:00
2017-05-08 17:15:11 -07:00
2017-03-10 20:55:09 +01:00
2017-03-10 20:55:09 +01:00
2017-03-02 08:42:39 +01:00
2017-05-17 21:55:58 -04:00
2017-05-08 17:15:11 -07:00
2017-03-17 10:18:47 -04:00
2017-03-02 08:42:39 +01:00
2017-05-08 17:15:11 -07:00
2017-01-23 11:32:16 -08:00
2017-05-01 09:15:53 +02:00
2017-05-08 17:15:14 -07:00
2017-02-24 17:46:56 -08:00
2017-03-13 15:57:41 -03:00
2017-04-21 20:30:46 +08:00
2017-03-02 08:42:34 +01:00
2017-04-18 10:37:13 +02:00
2017-05-13 17:26:01 -05:00
2017-05-08 17:15:12 -07:00
2017-03-02 08:42:39 +01:00
2017-05-23 07:40:44 -05:00
2017-05-02 11:38:06 -07:00
2017-03-02 08:42:36 +01:00
2017-05-10 10:30:46 -07:00
2017-03-02 08:42:26 +01:00
2017-03-02 08:42:35 +01:00
2017-04-11 09:06:32 +02:00
2017-03-08 09:18:02 +01:00
2016-11-16 10:15:09 +01:00
2016-12-22 22:58:37 -05:00
2017-05-05 11:08:43 -07:00
2017-04-21 15:59:52 -04:00
2017-05-08 17:15:10 -07:00
2017-05-08 17:15:12 -07:00
2017-03-02 08:42:27 +01:00
2017-03-02 08:42:35 +01:00
2017-03-02 08:42:39 +01:00
2017-03-06 15:26:37 -06:00
2017-03-02 08:42:31 +01:00
2017-03-02 08:42:29 +01:00
2017-03-02 08:42:29 +01:00
2017-03-03 01:45:36 +01:00
2017-03-02 08:42:38 +01:00
2017-03-02 08:42:34 +01:00
2017-03-02 08:42:34 +01:00
2017-05-01 19:12:53 -07:00