Re: [PATCH bpf v3] bpf: fix narrower loads on s390

2019-07-23 Thread Alexei Starovoitov
On Fri, Jul 19, 2019 at 2:18 AM Ilya Leoshkevich wrote: > > The very first check in test_pkt_md_access is failing on s390, which > happens because loading a part of a struct __sk_buff field produces > an incorrect result. > > The preprocessed code of the check is: > > { > __u8 tmp = *((vol

[PATCH bpf v3] bpf: fix narrower loads on s390

2019-07-19 Thread Ilya Leoshkevich
The very first check in test_pkt_md_access is failing on s390, which happens because loading a part of a struct __sk_buff field produces an incorrect result. The preprocessed code of the check is: { __u8 tmp = *((volatile __u8 *)&skb->len + ((sizeof(skb->len) - sizeof(__u8