Re: [PATCH bpf] bpf: fix crash due to inode i_op mismatch with clang/llvm

2018-03-20 Thread Daniel Borkmann
On 03/20/2018 03:06 AM, Linus Torvalds wrote: > On Mon, Mar 19, 2018 at 6:50 PM, Linus Torvalds > wrote: >> >> Add it to everything. If it's an invalid optimization, it shouldn't be on. > > IOW, why isn't this just something like > > diff --git a/Makefile b/Makefile > index d65e2e229017..01a

Re: [PATCH bpf] bpf: fix crash due to inode i_op mismatch with clang/llvm

2018-03-19 Thread Linus Torvalds
On Mon, Mar 19, 2018 at 6:50 PM, Linus Torvalds wrote: > > Add it to everything. If it's an invalid optimization, it shouldn't be on. IOW, why isn't this just something like diff --git a/Makefile b/Makefile index d65e2e229017..01abedc2e79f 100644 --- a/Makefile +++ b/Makefile @@ -826,6

Re: [PATCH bpf] bpf: fix crash due to inode i_op mismatch with clang/llvm

2018-03-19 Thread Linus Torvalds
On Mon, Mar 19, 2018 at 6:17 PM, Daniel Borkmann wrote: > > Reason for this miscompilation is that clang has the more aggressive > -fmerge-all-constants enabled by default. In fact, clang source code > has an 'insightful' comment about it in its source code under > lib/AST/ExprConstant.cpp: > >

[PATCH bpf] bpf: fix crash due to inode i_op mismatch with clang/llvm

2018-03-19 Thread Daniel Borkmann
Prasad reported that he has seen crashes with netd on Android with arm64 in the form of (note, the taint is unrelated): [ 4134.721483] Unable to handle kernel paging request at virtual address 80001 [ 4134.820925] Mem abort info: [ 4134.901283] Exception class = DABT (current EL), IL