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]
Date:	Fri, 12 Jun 2015 10:17:15 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Daniel Wagner <daniel.wagner@...-carit.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Tom Zanussi <tom.zanussi@...ux.intel.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: latency histogram with BPF

On 6/12/15 7:33 AM, Daniel Wagner wrote:
> On 06/12/2015 08:12 AM, Daniel Wagner wrote:
>> On 06/12/2015 12:08 AM, Alexei Starovoitov wrote:
>>> On 6/11/15 12:25 AM, Daniel Wagner wrote:
>>> If you have any suggestions on where to look, I'm all ears.
>>> My stack traces look like:
>>> Running with 10*40 (== 400) tasks.
>>> [   12.032571] kernel BUG at ../mm/slub.c:3413!
>
> I hit this as well.
>
> After looking and playing around for while I think I found the source of
> the problem: The path from the BPF program into the hash table code is
> triggering the crash.
>
> Attaching kprobes to trace_preempt_[on|off] works fine. Empty BPF
> programs connected to the probes is no problem as well. So I changed the
> BPF program to use only arrays instead of hash tables. No crash anymore.

yes. I've tried that too. arrays work fine indeed.

> I suspect the hash table code will call trace_preempt_[off|on]
> eventually and that is not going to fly.

The recursive calls into bpf programs are detected and prevented.
That's ok. I've tested attaching kprobes to kmalloc/kfree and
from the program do hash_map->update_elem->kmalloc which triggers
recursive call into the same program. All works fine.
There is something else here.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ