Re: [PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-21 Thread Alexei Starovoitov
On Tue, Feb 21, 2017 at 02:00:13PM +0100, Jesper Dangaard Brouer wrote: > On Tue, 21 Feb 2017 00:06:11 -0800 > Alexei Starovoitov wrote: > > > On Mon, Feb 20, 2017 at 05:25:58PM +0100, Jesper Dangaard Brouer wrote: > > > On Mon, 20 Feb 2017 16:57:34 +0100 > > >

Re: [PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-21 Thread Jesper Dangaard Brouer
On Tue, 21 Feb 2017 00:06:11 -0800 Alexei Starovoitov wrote: > On Mon, Feb 20, 2017 at 05:25:58PM +0100, Jesper Dangaard Brouer wrote: > > On Mon, 20 Feb 2017 16:57:34 +0100 > > Daniel Borkmann wrote: > > > > > On 02/20/2017 04:35 PM,

Re: [PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-21 Thread Alexei Starovoitov
On Mon, Feb 20, 2017 at 05:25:58PM +0100, Jesper Dangaard Brouer wrote: > On Mon, 20 Feb 2017 16:57:34 +0100 > Daniel Borkmann wrote: > > > On 02/20/2017 04:35 PM, Jesper Dangaard Brouer wrote: > > > It is confusing users of samples/bpf that exceeding the resource > > >

Re: [PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-20 Thread Jesper Dangaard Brouer
On Mon, 20 Feb 2017 16:57:34 +0100 Daniel Borkmann wrote: > On 02/20/2017 04:35 PM, Jesper Dangaard Brouer wrote: > > It is confusing users of samples/bpf that exceeding the resource > > limits for RLIMIT_MEMLOCK result in an "Operation not permitted" > > message. This is

Re: [PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-20 Thread Daniel Borkmann
On 02/20/2017 04:35 PM, Jesper Dangaard Brouer wrote: It is confusing users of samples/bpf that exceeding the resource limits for RLIMIT_MEMLOCK result in an "Operation not permitted" message. This is due to bpf limits check return -EPERM. Instead return -ENOMEM, like most other users of this

[PATCH net-next] bpf: return errno -ENOMEM when exceeding RLIMIT_MEMLOCK

2017-02-20 Thread Jesper Dangaard Brouer
It is confusing users of samples/bpf that exceeding the resource limits for RLIMIT_MEMLOCK result in an "Operation not permitted" message. This is due to bpf limits check return -EPERM. Instead return -ENOMEM, like most other users of this API. Fixes: aaac3ba95e4c ("bpf: charge user for