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

2019-07-17 Thread Y Song
On Wed, Jul 17, 2019 at 1:52 PM Ilya Leoshkevich wrote: > > > Am 17.07.2019 um 18:25 schrieb Y Song : > > > > On Wed, Jul 17, 2019 at 3:36 AM Ilya Leoshkevich wrote: > >> > >> > >> Here is a better one: len=0x11223344 and we would like to do > >> ((u8 *)&len)[3]. > >> > >> len is represented as `

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

2019-07-17 Thread Ilya Leoshkevich
> Am 17.07.2019 um 18:25 schrieb Y Song : > > On Wed, Jul 17, 2019 at 3:36 AM Ilya Leoshkevich wrote: >> >> >> Here is a better one: len=0x11223344 and we would like to do >> ((u8 *)&len)[3]. >> >> len is represented as `11 22 33 44` in memory, so the desired result is >> 0x44. It can be obtai

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

2019-07-17 Thread Y Song
On Wed, Jul 17, 2019 at 3:36 AM Ilya Leoshkevich wrote: > > > Am 17.07.2019 um 11:21 schrieb Ilya Leoshkevich : > > > >> Am 17.07.2019 um 07:11 schrieb Y Song : > >> > >> [sorry, resend again as previous one has come text messed out due to > >> networking issues] > >> > >> On Tue, Jul 16, 2019 at

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

2019-07-17 Thread Ilya Leoshkevich
> Am 17.07.2019 um 11:21 schrieb Ilya Leoshkevich : > >> Am 17.07.2019 um 07:11 schrieb Y Song : >> >> [sorry, resend again as previous one has come text messed out due to >> networking issues] >> >> On Tue, Jul 16, 2019 at 10:08 PM Y Song wrote: >>> >>> On Tue, Jul 16, 2019 at 4:59 AM Ilya Le

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

2019-07-17 Thread Ilya Leoshkevich
> Am 17.07.2019 um 07:11 schrieb Y Song : > > [sorry, resend again as previous one has come text messed out due to > networking issues] > > On Tue, Jul 16, 2019 at 10:08 PM Y Song wrote: >> >> On Tue, Jul 16, 2019 at 4:59 AM Ilya Leoshkevich wrote: >>> >>> test_pkt_md_access is failing on s39

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

2019-07-16 Thread Y Song
[sorry, resend again as previous one has come text messed out due to networking issues] On Tue, Jul 16, 2019 at 10:08 PM Y Song wrote: > > On Tue, Jul 16, 2019 at 4:59 AM Ilya Leoshkevich wrote: > > > > test_pkt_md_access is failing on s390, since the associated eBPF prog > > returns TC_ACT_SHOT

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

2019-07-16 Thread Y Song
On Tue, Jul 16, 2019 at 4:59 AM Ilya Leoshkevich wrote: > > test_pkt_md_access is failing on s390, since the associated eBPF prog > returns TC_ACT_SHOT, which in turn happens because loading a part of a > struct __sk_buff field produces an incorrect result. > > The problem is that when verifier em