[PATCH] trace: correct start_index in find_next

2015-12-30 Thread Qiu, PeiyangX
From: Qiu Peiyang When we do cat /sys/kernel/debug/tracing/printk_formats, we hit kernel panic at t_show. general protection fault: [#1] PREEMPT SMP CPU: 0 PID: 2957 Comm: sh Tainted: G W O 3.14.55-x86_64-01062-gd4acdc7 #2 RIP: 0010:[] [] t_show+0x22/0xe0 RSP: :88002b4ebe80

[PATCH] trace: correct start_index in find_next

2015-12-30 Thread Qiu, PeiyangX
From: Qiu Peiyang When we do cat /sys/kernel/debug/tracing/printk_formats, we hit kernel panic at t_show. general protection fault: [#1] PREEMPT SMP CPU: 0 PID: 2957 Comm: sh Tainted: G W O 3.14.55-x86_64-01062-gd4acdc7 #2 RIP: 0010:[] [] t_show+0x22/0xe0 RSP:

[PATCH 1/2] ftrace: fix the race between ftrace and insmod

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare

[PATCH 2/2] module: deal with the failure of complete_formation

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang complete_formation might fail. kernel need clean up ftrace records of the module. The patch fixes it by tuning the operation sequence in complete_formation. After complete_formation checks verify_export_symbols, call ftrace_module_init to init ftrace records. Signed-off-by:

[PATCH 1/2] ftrace: fix the race between ftrace and insmod

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare

[PATCH 0/2] fix ftrace initialization issue when a module is loaded

2015-12-24 Thread Qiu, PeiyangX
When a module is loaded, current ftrace initialization around the new module has some issues. 1) ftrace might race with insmod: Just after load_module calls ftrace_module_init to add ftrace records of the module, ftrace_run_update_code might jump in to change module codes. But load_module calls

[PATCH 1/2] ftrace: fix the race between ftrace and insmod

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call

[PATCH 0/2] fix ftrace initialization issue when a module is loaded

2015-12-24 Thread Qiu, PeiyangX
When a module is loaded, current ftrace initialization around the new module has some issues. 1) ftrace might race with insmod: Just after load_module calls ftrace_module_init to add ftrace records of the module, ftrace_run_update_code might jump in to change module codes. But load_module calls

[PATCH 1/2] ftrace: fix the race between ftrace and insmod

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call

[PATCH 2/2] module: deal with the failure of complete_formation

2015-12-24 Thread Qiu, PeiyangX
From: Qiu Peiyang complete_formation might fail. kernel need clean up ftrace records of the module. The patch fixes it by tuning the operation sequence in complete_formation. After complete_formation checks verify_export_symbols, call ftrace_module_init to init ftrace

[PATCH] ftrace: fix race between ftrace and insmod

2015-12-13 Thread Qiu, PeiyangX
We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare

[PATCH] ftrace: fix race between ftrace and insmod

2015-12-13 Thread Qiu, PeiyangX
We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare

[PATCH] ftrace: fix race between ftrace and insmod

2015-12-13 Thread Qiu, PeiyangX
We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare

[PATCH] ftrace: fix race between ftrace and insmod

2015-12-13 Thread Qiu, PeiyangX
We hit ftrace_bug report when booting Android on a 64bit ATOM SOC chip. Basically, there is a race between insmod and ftrace_run_update_code. After load_module=>ftrace_module_init, another thread jumps in to call ftrace_run_update_code=>ftrace_arch_code_modify_prepare