Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread Alexei Starovoitov
On Fri, Nov 30, 2018 at 08:44:20PM -0800, David Miller wrote: > From: Alexei Starovoitov > Date: Fri, 30 Nov 2018 13:58:20 -0800 > > > On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: > >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > >> index 426b5c8..c9647ea

Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread David Miller
From: Alexei Starovoitov Date: Fri, 30 Nov 2018 13:58:20 -0800 > On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >> index 426b5c8..c9647ea 100644 >> --- a/include/uapi/linux/bpf.h >> +++ b/include/uapi/linux/bpf.h

Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread David Miller
From: Alexei Starovoitov Date: Fri, 30 Nov 2018 13:58:20 -0800 > On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: >> +/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the >> + * verifier will allow any alignment whatsoever. This bypasses >> + * what

Re: [PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-30 Thread Alexei Starovoitov
On Thu, Nov 29, 2018 at 07:32:41PM -0800, David Miller wrote: > > Often we want to write tests cases that check things like bad context > offset accesses. And one way to do this is to use an odd offset on, > for example, a 32-bit load. > > This unfortunately triggers the alignment checks first

[PATCH bpf-next 1/4] bpf: Add BPF_F_ANY_ALIGNMENT.

2018-11-29 Thread David Miller
Often we want to write tests cases that check things like bad context offset accesses. And one way to do this is to use an odd offset on, for example, a 32-bit load. This unfortunately triggers the alignment checks first on platforms that do not set CONFIG_EFFICIENT_UNALIGNED_ACCESS. So the