summaryrefslogtreecommitdiffstats
path: root/fs/fscache
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2021-03-01 16:40:19 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-03-04 16:02:31 +0100
commit83a2881903f3d5bc08ded4fb04f6e3bedb1fba65 (patch)
tree7cb2b678083cf4c0d1539e66ba6cd6c6ed5e75b8 /fs/fscache
parent2b2aedabc44e9660f90ccf7ba1ca2706d75f411f (diff)
downloadlinux-stable-83a2881903f3d5bc08ded4fb04f6e3bedb1fba65.tar.gz
linux-stable-83a2881903f3d5bc08ded4fb04f6e3bedb1fba65.tar.bz2
linux-stable-83a2881903f3d5bc08ded4fb04f6e3bedb1fba65.zip
bpf: Account for BPF_FETCH in insn_has_def32()
insn_has_def32() returns false for 32-bit BPF_FETCH insns. This makes adjust_insn_aux_data() incorrectly set zext_dst, as can be seen in [1]. This happens because insn_no_def() does not know about the BPF_FETCH variants of BPF_STX. Fix in two steps. First, replace insn_no_def() with insn_def_regno(), which returns the register an insn defines. Normally insn_no_def() calls are followed by insn->dst_reg uses; replace those with the insn_def_regno() return value. Second, adjust the BPF_STX special case in is_reg64() to deal with queries made from opt_subreg_zext_lo32_rnd_hi32(), where the state information is no longer available. Add a comment, since the purpose of this special case is not clear at first glance. [1] https://lore.kernel.org/bpf/20210223150845.1857620-1-jackmanb@google.com/ Fixes: 5ffa25502b5a ("bpf: Add instructions for atomic_[cmp]xchg") Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Brendan Jackman <jackmanb@google.com> Link: https://lore.kernel.org/bpf/20210301154019.129110-1-iii@linux.ibm.com
Diffstat (limited to 'fs/fscache')
0 files changed, 0 insertions, 0 deletions