Chenbo Feng
84354172b5
BACKPORT: bpf: Add file mode configuration into bpf maps
...
Introduce the map read/write flags to the eBPF syscalls that returns the
map fd. The flags is used to set up the file mode when construct a new
file descriptor for bpf maps. To not break the backward capability, the
f_flags is set to O_RDWR if the flag passed by syscall is 0. Otherwise
it should be O_RDONLY or O_WRONLY. When the userspace want to modify or
read the map content, it will check the file mode to see if it is
allowed to make the change.
Signed-off-by: Chenbo Feng <fengc@google.com >
Acked-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: David S. Miller <davem@davemloft.net >
Deleted the file mode configuration code in unsupported map type and
removed the file mode check in non-existing helper functions.
(cherry-pick from net-next: 6e71b04a82248ccf13a94b85cbc674a9fefe53f5)
Bug: 30950746
Change-Id: Icfad20f1abb77f91068d244fb0d87fa40824dd1b
Signed-off-by: Chatur27 <jasonbright2709@gmail.com >
2022-03-04 20:16:51 +01:00
..
2019-03-04 23:28:09 +00:00
2015-10-13 17:42:34 +02:00
2017-02-14 16:44:11 -08:00
2018-05-08 10:13:50 -07:00
2015-06-23 02:40:03 +02:00
2015-09-23 20:23:25 +01:00
2019-09-21 07:12:39 +02:00
2016-09-15 09:10:24 -07:00
2020-06-11 08:44:31 -07:00
2021-07-24 19:24:32 +03:00
2015-06-23 14:08:54 -07:00
2015-08-26 20:32:35 +02:00
2016-11-07 16:23:44 +05:30
2015-11-01 13:48:26 +11:00
2017-11-02 09:40:49 +01:00
2021-07-24 19:24:49 +03:00
2016-03-23 21:10:42 -07:00
2016-03-22 11:04:51 -07:00
2015-10-05 03:16:46 -07:00
2015-09-08 13:34:59 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 21:16:24 -07:00
2017-12-05 11:22:51 +01:00
2015-09-29 13:37:04 -07:00
2022-03-04 20:16:40 +01:00
2022-03-04 20:16:51 +01:00
2015-10-26 19:38:30 -07:00
2016-12-15 08:49:22 -08:00
2019-08-06 18:28:28 +02:00
2021-01-09 13:34:15 +01:00
2016-06-01 15:45:21 -06:00
2015-06-22 15:49:27 +08:00
2015-06-23 07:00:41 -07:00
2015-08-25 14:41:50 -05:00
2015-10-31 19:05:59 -04:00
2015-09-10 06:54:15 +02:00
2016-03-22 11:10:20 -07:00
2017-03-29 17:25:35 -07:00
2018-09-19 22:48:56 +02:00
2018-02-23 10:03:32 -08:00
2018-04-12 09:58:05 -07:00
2017-01-02 14:06:47 +05:30
2016-03-23 19:57:25 -07:00
2019-07-31 21:37:35 -07:00
2019-06-11 08:37:51 -07:00
2017-06-12 17:42:18 -07:00
2015-07-23 17:48:43 -07:00
2016-10-25 10:00:15 -07:00
2016-03-23 20:58:02 -07:00
2017-04-18 14:36:37 +01:00
2016-09-15 08:27:40 +02:00
2015-10-23 23:26:43 +02:00
2015-09-23 08:44:22 +02:00
2016-03-22 11:05:59 -07:00
2015-09-29 13:36:06 -07:00
2019-02-22 14:47:05 -08:00
2015-10-30 12:10:51 +09:00
2015-08-17 14:22:48 -07:00
2020-05-27 16:40:29 +02:00
2016-02-16 13:51:20 -08:00
2016-02-16 13:51:20 -08:00
2016-02-16 13:51:18 -08:00
2015-08-10 14:03:54 -07:00
2020-04-02 19:02:34 +02:00
2015-08-17 21:33:06 -07:00
2015-06-29 18:56:21 -07:00
2016-10-12 17:34:22 +05:30
2019-01-14 15:19:34 -08:00
2019-11-07 11:14:06 -06:00
2016-03-22 11:04:51 -07:00
2016-03-22 11:07:51 -07:00
2015-08-21 09:10:11 -07:00
2015-06-24 02:15:54 -07:00
2016-09-16 17:21:59 -07:00
2017-05-02 21:19:53 -07:00
2017-04-07 05:50:03 +00:00
2021-08-12 03:09:18 +03:00
2018-05-15 17:49:01 -07:00
2015-09-10 13:29:01 -07:00
2016-02-16 13:50:57 -08:00
2018-04-29 07:50:02 +02:00
2020-06-03 08:12:10 +02:00
2019-02-20 10:13:24 +01:00
2021-01-09 13:34:15 +01:00
2020-05-02 16:31:15 +00:00
2015-09-24 14:31:37 -07:00
2017-03-18 08:55:10 -07:00
2016-03-23 20:51:34 -07:00
2016-03-23 20:45:57 -07:00
2015-08-03 17:30:00 -07:00
2015-09-11 15:21:34 -07:00
2016-04-13 11:12:20 -07:00
2015-10-04 12:54:54 +01:00
2017-09-06 04:34:42 +00:00
2015-07-21 10:39:05 -07:00
2015-08-03 22:35:00 -07:00
2017-10-21 17:09:06 +02:00
2021-03-03 16:44:21 +01:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2017-01-11 18:56:31 -08:00
2016-11-24 21:07:50 +05:30
2016-11-24 21:07:23 +05:30
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-23 20:11:25 -07:00
2016-03-22 11:08:56 -07:00
2016-03-22 11:07:51 -07:00
2017-05-23 06:06:01 +00:00
2016-03-22 11:07:59 -07:00
2017-05-01 23:40:47 -07:00
2017-03-07 14:36:54 +08:00
2017-02-10 03:12:08 -08:00
2016-03-23 21:24:03 -07:00
2016-03-22 11:05:51 -07:00
2016-03-23 20:38:58 -07:00
2016-03-22 11:08:34 -07:00
2016-09-30 16:27:31 -07:00
2016-03-23 21:22:38 -07:00
2016-03-22 11:07:18 -07:00
2015-07-27 22:53:19 -04:00
2015-08-10 13:46:21 -07:00
2016-03-22 11:09:37 -07:00
2015-07-08 23:34:53 -07:00
2015-06-18 21:14:31 +02:00
2017-05-22 23:19:33 -07:00
2021-01-09 13:58:20 -07:00
2022-01-05 12:30:27 +01:00
2015-08-27 19:44:53 -04:00
2015-11-23 21:53:08 -05:00
2015-07-20 14:58:46 -04:00
2019-01-30 17:22:21 -08:00
2015-10-09 10:40:37 -06:00
2016-03-23 21:24:25 -07:00
2015-12-14 14:00:09 -05:00
2017-05-22 23:19:33 -07:00
2021-11-26 11:58:42 +01:00
2022-03-04 20:16:35 +01:00
2015-09-17 21:09:07 -07:00
2016-03-22 11:05:53 -07:00
2015-10-21 14:46:56 -06:00
2019-05-16 13:34:46 -07:00
2015-10-02 14:35:17 +01:00
2015-10-27 19:55:13 -07:00
2016-10-26 10:43:09 +03:00
2016-03-23 19:57:25 -07:00
2016-03-23 19:57:25 -07:00
2016-03-23 20:58:34 -07:00
2017-03-07 15:29:38 -08:00
2017-11-21 09:21:23 +01:00
2017-03-22 12:55:20 -06:00
2017-05-23 06:06:01 +00:00
2017-03-31 15:07:51 -06:00
2017-01-03 11:23:35 -08:00
2022-03-04 20:16:49 +01:00
2015-10-04 12:54:54 +01:00
2015-10-12 14:20:06 +01:00
2018-07-25 10:18:27 +02:00
2015-09-04 16:54:41 -07:00
2016-03-23 19:58:14 -07:00
2016-03-23 19:58:14 -07:00
2015-06-10 17:34:26 -07:00
2021-09-22 11:41:25 +02:00
2016-08-20 19:04:33 -07:00
2019-06-17 19:54:22 +02:00
2016-04-07 16:49:53 +05:30
2016-03-22 11:09:38 -07:00
2016-05-19 12:32:41 +05:30
2016-04-22 11:57:49 -07:00
2015-10-04 20:28:58 +01:00
2016-03-22 11:04:51 -07:00
2016-03-22 11:04:51 -07:00
2021-01-09 13:58:20 -07:00
2015-09-11 00:32:36 -07:00
2016-03-23 21:25:31 -07:00
2018-02-21 15:40:47 +00:00
2016-03-22 11:08:58 -07:00
2019-06-11 12:24:07 +02:00
2015-07-24 14:15:10 -07:00
2015-06-11 23:37:37 +02:00
2015-10-01 21:42:35 -04:00
2015-10-27 18:55:31 -07:00
2017-03-02 22:19:43 -08:00
2016-08-30 21:29:09 -07:00
2015-12-04 08:38:42 -07:00
2019-05-14 17:56:57 -07:00
2016-12-16 13:52:17 -08:00
2019-05-15 14:34:43 +00:00
2015-10-16 10:44:02 +02:00
2019-05-14 17:56:56 -07:00
2015-07-01 10:11:17 +02:00
2015-07-07 14:27:05 +03:00
2015-07-07 14:27:04 +03:00
2019-05-14 17:56:59 -07:00
2015-07-06 08:25:50 -03:00
2017-10-20 12:28:13 +09:00