I am running Gentoo with hardened-sources-3.14.5-r2 (and64) and, every now and then, my kernel dies.
Here is the kernel panic screen picture: https://imgur.com/LrdRUT8
And here is my kernel config, for completeness: https://gist.github.com/giact/b1f3baa6477c561411c7
I am not entirely sure what I am doing, but after learning a bit of gdb, I got to this:
- Code: Select all
0xffffffff81342acf <+310>: add %r8,%rcx
0xffffffff81342ad2 <+313>: cmp $0x7fffffff,%rcx
0xffffffff81342ad9 <+320>: jle 0xffffffff81342ae4 <__sk_mem_schedule+331>
0xffffffff81342adb <+322>: mov $0xffffffff815a3fc2,%rcx
0xffffffff81342ae2 <+329>: jmp 0xffffffff81342af4 <__sk_mem_schedule+347>
0xffffffff81342ae4 <+331>: cmp $0xffffffff80000000,%rcx
0xffffffff81342aeb <+338>: jge 0xffffffff81342b0c <__sk_mem_schedule+371>
0xffffffff81342aed <+340>: mov $0xffffffff815a4004,%rcx
0xffffffff81342af4 <+347>: mov $0xffffffff815a3fdf,%rdx
0xffffffff81342afb <+354>: mov $0x583,%esi
0xffffffff81342b00 <+359>: mov $0xffffffff815a3ff1,%rdi
0xffffffff81342b07 <+366>: callq 0xffffffff8110a345 <report_size_overflow>
0xffffffff81342b0c <+371>: add $0xfff,%ecx
So I supposed all the overflow checks start at 0xffffffff81342acf
Then I did this:
- Code: Select all
(gdb) l *0xffffffff81342acf
0xffffffff81342acf is in __sk_mem_schedule (net/core/sock.c:2014).
2009
2010 if (!sk_under_memory_pressure(sk))
2011 return 1;
2012 alloc = sk_sockets_allocated_read_positive(sk);
2013 if (sk_prot_mem_limits(sk, 2) > alloc *
2014 sk_mem_pages(sk->sk_wmem_queued +
2015 atomic_read(&sk->sk_rmem_alloc) +
2016 sk->sk_forward_alloc))
2017 return 1;
2018 }
So, I think the problem is there somehow.
Can anyone help me out?
Thanks in advance!