RE: [RFCv2 4/4] bpf: inhibit speculated out-of-bounds pointers

2018-01-08 Thread Reshetova, Elena
> On Fri, Jan 05, 2018 at 02:57:50PM +, Mark Rutland wrote: > > Note: this patch is an *example* use of the nospec API. It is understood > > that this is incomplete, etc. > > > > Under speculation, CPUs may mis-predict branches in bounds checks. Thus, > > memory accesses under a bounds check ma

Re: [RFCv2 4/4] bpf: inhibit speculated out-of-bounds pointers

2018-01-05 Thread Alexei Starovoitov
On Fri, Jan 05, 2018 at 02:57:50PM +, Mark Rutland wrote: > Note: this patch is an *example* use of the nospec API. It is understood > that this is incomplete, etc. > > Under speculation, CPUs may mis-predict branches in bounds checks. Thus, > memory accesses under a bounds check may be specul

Re: [RFCv2 4/4] bpf: inhibit speculated out-of-bounds pointers

2018-01-05 Thread Mark Rutland
On Fri, Jan 05, 2018 at 08:38:43AM -0800, Dan Williams wrote: > On Fri, Jan 5, 2018 at 6:57 AM, Mark Rutland wrote: > > Note: this patch is an *example* use of the nospec API. It is understood > > that this is incomplete, etc. > > > > Under speculation, CPUs may mis-predict branches in bounds chec

Re: [RFCv2 4/4] bpf: inhibit speculated out-of-bounds pointers

2018-01-05 Thread Dan Williams
On Fri, Jan 5, 2018 at 6:57 AM, Mark Rutland wrote: > Note: this patch is an *example* use of the nospec API. It is understood > that this is incomplete, etc. > > Under speculation, CPUs may mis-predict branches in bounds checks. Thus, > memory accesses under a bounds check may be speculated even

[RFCv2 4/4] bpf: inhibit speculated out-of-bounds pointers

2018-01-05 Thread Mark Rutland
Note: this patch is an *example* use of the nospec API. It is understood that this is incomplete, etc. Under speculation, CPUs may mis-predict branches in bounds checks. Thus, memory accesses under a bounds check may be speculated even if the bounds check fails, providing a primitive for building