Alexei Starovoitov
4923ec0b10
bpf: simplify verifier register state assignments
...
verifier is using the following structure to track the state of registers:
struct reg_state {
enum bpf_reg_type type;
union {
int imm;
struct bpf_map *map_ptr;
};
};
and later on in states_equal() does memcmp(&old->regs[i], &cur->regs[i],..)
to find equivalent states.
Throughout the code of verifier there are assignements to 'imm' and 'map_ptr'
fields and it's not obvious that most of the assignments into 'imm' don't
need to clear extra 4 bytes (like mark_reg_unknown_value() does) to make sure
that memcmp doesn't go over junk left from 'map_ptr' assignment.
Simplify the code by converting 'int' into 'long'
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-10 22:43:18 -04:00
..
2016-04-10 22:43:18 -04:00
2015-06-16 11:04:29 +01:00
2016-02-22 08:51:37 +01:00
2016-04-09 17:41:41 -04:00
2015-12-04 22:46:25 +01:00
2016-03-22 15:36:02 -07:00
2016-03-17 09:45:10 +01:00
2016-03-31 15:03:58 +02:00
2016-03-24 22:59:58 -07:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-29 11:52:11 +02:00
2016-03-29 11:52:11 +02:00
2016-04-07 21:04:26 -04:00
2015-10-21 15:18:35 +01:00
2015-04-11 22:27:55 -04:00
2015-11-19 17:51:48 +01:00
2016-01-22 18:04:28 -05:00
2015-11-04 08:23:51 -05:00
2016-03-19 17:52:49 -07:00
2016-03-19 17:52:49 -07:00
2015-12-24 11:09:39 -05:00
2016-02-08 11:25:39 -05:00
2016-03-22 15:36:02 -07:00
2015-04-15 16:35:22 -07:00
2015-12-03 10:24:08 -05:00
2015-12-14 14:54:37 -05:00
2016-03-21 10:05:13 -07:00
2015-06-04 23:57:18 +02:00
2015-11-24 09:56:43 +01:00
2015-09-03 02:42:20 +02:00
2016-03-12 20:57:38 +01:00
2016-03-21 10:05:13 -07:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-04-12 21:03:31 +02:00
2016-03-25 16:37:42 -07:00
2015-09-10 13:29:01 -07:00
2016-03-22 15:36:02 -07:00
2016-01-20 17:09:18 -08:00
2016-03-08 17:04:02 +01:00
2015-04-15 16:35:22 -07:00
2016-03-22 15:36:02 -07:00
2015-11-23 09:44:58 +01:00
2015-11-23 09:44:58 +01:00
2016-03-15 16:55:16 -07:00
2016-01-20 17:09:18 -08:00
2015-05-12 09:46:00 +02:00
2016-03-22 15:36:02 -07:00
2016-01-30 09:49:57 +01:00
2016-03-17 11:33:45 -07:00
2016-01-20 17:09:18 -08:00
2016-01-20 17:09:18 -08:00
2015-10-23 17:55:10 +09:00
2015-08-04 10:16:54 +02:00
2015-12-07 16:59:37 -08:00
2015-09-04 16:54:41 -07:00
2016-02-09 11:54:23 +01:00
2016-03-22 15:36:02 -07:00
2015-09-11 15:21:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-03 21:49:27 +00:00
2016-03-17 21:46:32 -07:00
2015-09-01 08:40:25 -07:00
2016-02-16 13:04:58 -05:00
2015-02-13 21:21:38 -08:00
2016-03-22 15:36:02 -07:00
2015-11-09 15:53:39 -08:00
2014-12-16 15:53:03 -08:00
2016-01-31 15:44:04 -08:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2015-01-17 10:02:23 +13:00
2015-09-10 13:29:01 -07:00
2016-01-22 18:04:28 -05:00
2016-03-09 11:07:20 -08:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2016-03-15 13:50:29 -07:00
2016-03-01 20:36:56 +01:00
2016-03-01 20:36:56 +01:00
2016-03-25 16:37:42 -07:00
2014-12-13 12:42:48 -08:00
2016-01-16 11:17:24 -08:00
2015-12-01 14:00:53 -05:00
2016-03-17 15:09:34 -07:00
2016-03-22 15:36:02 -07:00
2016-03-17 15:09:34 -07:00
2015-09-05 13:46:58 -07:00
2015-01-18 01:03:45 -05:00
2015-10-06 11:25:01 -07:00
2016-03-22 15:36:02 -07:00
2016-02-29 09:53:09 +01:00
2014-12-05 17:19:27 -06:00
2016-01-04 10:27:55 -05:00
2014-12-17 12:31:40 -08:00
2014-12-04 14:34:47 -05:00
2016-03-17 15:09:34 -07:00
2016-03-02 10:28:47 -05:00
2016-03-18 20:05:39 -07:00