summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-04-07 02:39:21 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-04-11 02:43:18 (GMT)
commit4923ec0b10d998349c2ac4b38aa4674e539e6f92 (patch)
treeaabed2c261f40d5c2010493b3ed9a9088aa5f7a9 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
parentae95d7126104591348d37aaf78c8325967e02386 (diff)
downloadlinux-4923ec0b10d998349c2ac4b38aa4674e539e6f92.tar.xz
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>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c')
0 files changed, 0 insertions, 0 deletions