lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3daeee00-317a-1f82-648e-80ec14cfed22@candelatech.com>
Date:   Mon, 25 Nov 2019 09:35:02 -0800
From:   Ben Greear <greearb@...delatech.com>
To:     David Ahern <dsahern@...il.com>, netdev <netdev@...r.kernel.org>
Subject: Re: VRF and/or cgroups problem on Fedora-30, 5.2.21+ kernel

On 11/23/19 10:10 AM, David Ahern wrote:
> On 11/22/19 5:23 PM, Ben Greear wrote:
>>>
>>
>> Setting:  ulimit -l 1024
>>
>> 'fixed' the problem.
>>
>> I'd rather waste a bit of memory and not have any of my users hit such
>> an esoteric
>> bug, so I'll set it to at least 1024 going forward.
> 
> agreed.
> 
>>
>> Would large numbers of vrf and/or network devices mean you need more
>> locked memory?
> 
> I have seen this problem way too much, but not taken the time to track
> down all of the locked memory use. A rough estimate is that each 'ip vrf
> exec' uses 1 page (4kB) of locked memory until the command exits. If you
> use that as a rule you would be on the high end. Commands in the same
> cgroup hierarchy should all be using the same program.

I am not sure if it is a coincidence or not, but we saw the problem when
connected with rdesktop more often than we connected with VNC.

>> And surely 'ip' could output a better error than just 'permission
>> denied' for
>> this error case?  Or even something that would show up in dmesg to give
>> a clue?
> 
> That error comes from the bpf syscall:
> 
> bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_CGROUP_SOCK, insn_cnt=6,
> insns=0x7ffc8e5d1e00, license="GPL", log_level=1, log_size=262144,
> log_buf="", kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0,
> prog_name="", prog_ifindex=0,
> expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0,
> func_info_rec_size=0, func_info=NULL, func_info_cnt=0,
> line_info_rec_size=0, line_info=NULL, line_info_cnt=0}, 112) = -1 EPERM
> (Operation not permitted)

So, we can change iproute/lib/bpf.c to print a suggestion to increase locked memory
if this returns EPERM?

Thanks,
Ben

> 
> Yes it is odd and unhelpful for a memory limit to cause the failure and
> then return EPERM.
> 


-- 
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc  http://www.candelatech.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ