Wind River Support Network

HomeDefectsLIN5-3035
Fixed

LIN5-3035 : Previous kernel fix breaks dump_stack()

Created: Sep 30, 2013    Updated: Dec 19, 2017
Resolved Date: Nov 25, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.10
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Kernel

Description

A previous fix:

  "oprofile: grsecurity changes results in x86-64 page fault"

breaks dump_stack() when called from a kernel module. The fix record is:

  e4f30a9b788f367d5576bb350d7e7c67ccde681a

reverting this patch allows dump_stack() to work.

Workaround

Revert the patch, but of course this reintroduces whatever issue it was intended to fix.

Steps to Reproduce

$ configure --enable-board=qemux86-64 --enable-rootfs=glibc_cgl --enable-kernel=cgl

add the attached kernel module via a layer (eg the local layer could be used).

$ make
$ make start-target

Log in as usual, then:

root@qemu0:~# modprobe dumpstack
dumpstack_module_init
Pid: 983, comm: modprobe Tainted: G           O 3.4.43-grsec-WR5.0.1.7_cgl #1
Call Trace:
root@qemu0:~#

Note that there is no call stack.

Reverting the patch indicated will resolve the problem so that a dump works as follows:

root@qemu0:~# modprobe dumpstack
dumpstack_module_init
Pid: 983, comm: modprobe Tainted: G           O 3.4.43-grsec-WR5.0.1.7_cgl #1
Call Trace:
 [<ffffffffa0053000>] ? 0xffffffffa0052fff
 [<ffffffffa0053017>] dumpstack_module_init+0x17/0x381 [dumpstack]
 [<ffffffff810001cc>] do_one_initcall+0x3c/0x150
 [<ffffffff81095aea>] sys_init_module+0xa2a/0x1e40
 [<ffffffff81125b72>] ? handle_mm_fault+0x142/0x1f0
 [<ffffffff816f6ec4>] ? do_page_fault+0x1e4/0x680
 [<ffffffff816faf79>] system_call_fastpath+0x18/0x1d
 [<ffffffff8100beb8>] ? pax_randomize_kstack+0x38/0x70
 [<ffffffff816f3a9e>] ? retint_swapgs+0x7/0xd
2013 Sep 30 16:54:54 qemu0 dumpstack_module_init
root@qemu0:~#

Other Downloads


Live chat
Online