[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170503.093150.577196301654107151.davem@davemloft.net>
Date: Wed, 03 May 2017 09:31:50 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: alexei.starovoitov@...il.com
Cc: brouer@...hat.com, kafai@...com, netdev@...r.kernel.org,
eric@...it.org, borkmann@...earbox.net
Subject: Re: [net-next PATCH 1/4] samples/bpf: adjust rlimit RLIMIT_MEMLOCK
for traceex2, tracex3 and tracex4
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
Date: Tue, 2 May 2017 17:53:16 -0700
> On Tue, May 02, 2017 at 02:31:50PM +0200, Jesper Dangaard Brouer wrote:
>> Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf samples
>> as these are using more and larger maps than can fit in distro default 64Kbytes limit.
>>
>> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ...
>> + struct rlimit r = {1024*1024, RLIM_INFINITY};
> ...
>> + struct rlimit r = {1024*1024, RLIM_INFINITY};
>
> why magic numbers?
> All other samples do
> struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
Let's not do that.
People run these tests often as root, so the safer we make running
these test the better.
A weird magic limit is better than none at all.
Powered by blists - more mailing lists