Re: [PATCH net] bpf: fix 64-bit divide

2015-04-27 Thread David Miller
From: Alexei Starovoitov Date: Mon, 27 Apr 2015 14:40:37 -0700 > ALU64_DIV instruction should be dividing 64-bit by 64-bit, > whereas do_div() does 64-bit by 32-bit divide. > x64 and arm64 JITs correctly implement 64 by 64 unsigned divide. > llvm BPF backend emits code assuming that ALU64_DIV doe

[PATCH net] bpf: fix 64-bit divide

2015-04-27 Thread Alexei Starovoitov
ALU64_DIV instruction should be dividing 64-bit by 64-bit, whereas do_div() does 64-bit by 32-bit divide. x64 and arm64 JITs correctly implement 64 by 64 unsigned divide. llvm BPF backend emits code assuming that ALU64_DIV does 64 by 64. Fixes: 89aa075832b0 ("net: sock: allow eBPF programs to be a