[PATCH] can: Fix kernel panic at security_sock_rcv_skb

2017-01-11 Thread Liu ShuoX
From: Zhang Yanmin The patch is for fix the below kernel panic: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] selinux_socket_sock_rcv_skb+0x65/0x2a0 Call Trace: [] security_sock_rcv_skb+0x4c/0x60 [] sk_filter+0x41/0x210 [] sock_queue_rcv_skb+0x53/0x3a0 [] raw_rcv+0

[PATCH v4] perf: fix kernel panic when parsing user space CS saved in pt_regs

2014-06-17 Thread Liu ShuoX
here, perf might access a ruined pt_regs when saving userspace callchain. If app is 64bit, it doesn't go through this path. sysret_check keeps rsp pointing to pt_regs before executing sysretq to exit to user space. The patch fixes it by keeping rsp pointing to pt_regs like 64bit path. Signed-off

[PATCH v3] perf: fix kernel panic when parsing user space CS saved in pt_regs

2014-06-05 Thread Liu ShuoX
a bad pt_regs. The patch fixes it by keeping rsp pointing to pt_regs. Signed-off-by: Zhang Yanmin Signed-off-by: Liu Shuox --- arch/x86/ia32/ia32entry.S | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 4

[PATCH v2] perf: fix kernel panic when parsing user space CS saved in pt_regs

2014-06-05 Thread Liu ShuoX
nk. Before calling, sysexit_from_sys_call already pops up pt_regs, then trace_hardirqs_on_thunk would reuse pt_regs space. If perf NMI happens here, perf might use a bad pt_regs. The patch fixes it by keeping rsp pointing under pt_regs->ip. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- arch/x86/

Re: [PATCH] perf: fix kernel panic when parsing user space CS saved in pt_regs

2014-06-05 Thread Liu ShuoX
On Thu 5.Jun'14 at 9:19:19 +0200, Peter Zijlstra wrote: On Thu, Jun 05, 2014 at 10:36:10AM +0800, Liu ShuoX wrote: From: Zhang Yanmin We hit a kernel panic when running perf to collect some performance data. kenel is x86_64 and user space apps are 32bit. [ 71.965351, 1] [ Bin

[PATCH] perf: fix kernel panic when parsing user space CS saved in pt_regs

2014-06-04 Thread Liu ShuoX
From: Zhang Yanmin We hit a kernel panic when running perf to collect some performance data. kenel is x86_64 and user space apps are 32bit. [ 71.965351, 1] [ Binder_2] BUG: unable to handle kernel NULL pointer dereference at 0004 [ 71.965360, 1] [ Binder_2] IP: []

Re: [PATCH] [NOMERGE] reserved ram for pstore on PC (applied on top of new pstore patch)

2014-05-06 Thread Liu ShuoX
On Tue 6.May'14 at 10:48:00 -0400, Paul Gortmaker wrote: On 14-05-06 01:03 AM, Liu ShuoX wrote: for pstore record test. I don't know what kind of cc mechanism you were manually deploying when using git send-email here, but it is customary to actually Sorry. This is my first time t

[PATCH v5 2/3] pstore: add seq_ops for norm zone

2014-05-05 Thread Liu ShuoX
Some developers want to output the pstore record trace flexible. So add seq_ops into ramoops_zone in case users would make private output format. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 10 -- include/linux/pstore_ramoops.h | 1 + 2

[PATCH v5 3/3] pstore: support current records dump in ramoops

2014-05-05 Thread Liu ShuoX
dump the records in runtime is useful sometime. We could check the records and understand driver's and device's status. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 39 +++ fs/pstore/internal.h |

[PATCH] [NOMERGE] reserved ram for pstore on PC (applied on top of new pstore patch)

2014-05-05 Thread Liu ShuoX
for pstore record test. Signed-off-by: Liu ShuoX --- arch/x86/kernel/setup.c | 2 + fs/pstore/Makefile | 2 +- fs/pstore/test.c| 170 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 fs/pstore/test.c diff

[PATCH v5 1/3] pstore: restructure ramoops to support more trace

2014-05-05 Thread Liu ShuoX
store codes and new tracers which are based on ramoops. Developer could add a new tracer based on ramoops standalone and pstore detects it automatically. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- Documentation/ramoops.txt | 71 - arch/x86/kernel/vmlinux.

[PATCH v5 0/3] Add a method to expand tracers for pstore easily

2014-05-05 Thread Liu ShuoX
function at runtime by code. 3) Fix some minor issues. Changelog v3: 1) Fix compiling errors when CONFIG_PSTORE_RAM=m. Changelog v2: 1) Fix compiling errors when CONFIG_PSTORE_RAM is disabled. 2) Add some protection in the code in case we disable CONFIG_PSTORE_RAM. --- Liu ShuoX (2

[PATCH v4 1/3] pstore: restructure ramoops to support more trace

2014-04-24 Thread Liu ShuoX
store codes and new tracers which are based on ramoops. Developer could add a new tracer based on ramoops standalone and pstore detects it automatically. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- Documentation/ramoops.txt | 70 - arch/x86/kernel/vmlinux.

[PATCH v4 2/3] pstore: add seq_ops for norm zone

2014-04-24 Thread Liu ShuoX
Some developers want to output the pstore record trace flexible. So add seq_ops into ramoops_zone in case users would make private output format. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 10 -- include/linux/pstore_ramoops.h | 1 + 2

[PATCH v4 3/3] pstore: support current records dump in ramoops

2014-04-24 Thread Liu ShuoX
dump the records in runtime is useful sometime. We could check the records and understand driver's and device's status. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 39 +++ fs/pstore/internal.h |

[PATCH v4 0/3] Add a method to expand tracers for pstore easily

2014-04-24 Thread Liu ShuoX
) Fix some minor issues. Changelog v3: 1) Fix compiling errors when CONFIG_PSTORE_RAM=m. Changelog v2: 1) Fix compiling errors when CONFIG_PSTORE_RAM is disabled. 2) Add some protection in the code in case we disable CONFIG_PSTORE_RAM. --- Liu ShuoX (2): pstore: add seq_ops for norm zone

[PATCH v3 2/3] pstore: add seq_ops for norm zone

2014-04-03 Thread Liu ShuoX
Some developers want to output the pstore record trace flexible. So add seq_ops into ramoops_zone in case users would make private output format. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 10 -- include/linux/pstore_ramoops.h | 1 + 2

[PATCH v3 3/3] pstore: support current records dump in ramoops

2014-04-03 Thread Liu ShuoX
dump the records in runtime is useful sometime. We could check the records and understand driver's and device's status. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 39 +++ fs/pstore/internal.h |

[PATCH v3 1/3] pstore: restructure ramoops to support more trace

2014-04-03 Thread Liu ShuoX
store codes and new tracers which are based on ramoops. Developer could add a new tracer based on ramoops standalone and pstore detects it automatically. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- Documentation/ramoops.txt | 70 +- arch/x86/k

[PATCH v3 0/3] Add a method to expand tracers for pstore easily

2014-04-03 Thread Liu ShuoX
Hi, Here are the v3 of this series. Changelog v3: 1) Fix compiling errors when CONFIG_PSTORE_RAM=m. Changelog v2: 1) Fix compiling errors when CONFIG_PSTORE_RAM is disabled. 2) Add some protection in the code in case we disable CONFIG_PSTORE_RAM. --- Liu ShuoX (2): pstore: add seq_ops

[PATCH v2 3/3] pstore: support current records dump in ramoops

2014-03-30 Thread Liu ShuoX
From: Liu ShuoX dump the records in runtime is useful sometime. We could check the records and understand driver's and device's status. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 32 ++-- fs/pstore/internal.h

[PATCH v2 2/3] pstore: add seq_ops for norm zone

2014-03-30 Thread Liu ShuoX
From: Liu ShuoX Some developers want to output the pstore record trace flexible. So add seq_ops into ramoops_zone in case users would make private output format. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 10 -- include/linux

[PATCH v2 1/3] pstore: restructure ramoops to support more trace

2014-03-30 Thread Liu ShuoX
ramoops standalone and pstore detects it automatically. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- Documentation/ramoops.txt | 70 ++- arch/x86/kernel/vmlinux.lds.S | 9 ++ drivers/platform/chrome/chromeos_pstore.c | 2 +- fs/psto

[PATCH 2/3] pstore: add seq_ops for norm zone

2014-03-13 Thread Liu ShuoX
Some developers want to output the pstore record trace flexible. So add seq_ops into ramoops_zone in case users would make private output format. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 10 -- include/linux/pstore_ramoops.h | 1 + 2

[PATCH] pstore: support current records dump in ramoops

2014-03-13 Thread Liu ShuoX
dump the records in runtime is useful sometime. We could check the records and understand driver's and device's status. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- fs/pstore/inode.c | 32 ++-- fs/pstore/internal.h | 3 ++-

[PATCH 1/3] pstore: restructure ramoops to support more trace

2014-03-13 Thread Liu ShuoX
store codes and new tracers which are based on ramoops. Developer could add a new tracer based on ramoops standalone and pstore detects it automatically. Signed-off-by: Zhang Yanmin Signed-off-by: Liu ShuoX --- Documentation/ramoops.txt | 70 ++- arch/x86/k

Re: [PATCH 2/2] pstore: correct the max_dump_cnt clearing of ramoops

2014-03-12 Thread Liu ShuoX
On Tue 11.Mar'14 at 13:37:23 -0700, Kees Cook wrote: On Mon, Mar 10, 2014 at 11:17 PM, Liu ShuoX wrote: From: Liu ShuoX In case that ramoops_init_przs failed, max_dump_cnt won't be reset to zero in error handle path. Signed-off-by: Liu ShuoX --- fs/pstore/ram.c | 4 ++-- 1 file

[PATCH 2/2] pstore: correct the max_dump_cnt clearing of ramoops

2014-03-10 Thread Liu ShuoX
From: Liu ShuoX In case that ramoops_init_przs failed, max_dump_cnt won't be reset to zero in error handle path. Signed-off-by: Liu ShuoX --- fs/pstore/ram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 6f96d8c..52

[PATCH 1/2] pstore: fix NULL pointer fault if get NULL prz in ramoops_get_next_prz

2014-03-10 Thread Liu ShuoX
These two patches are applied on top of patches: https://lkml.org/lkml/2014/3/3/368 It has been added in -mm tree. Below is the first patch, and i will send the second by replying this one. From: Liu ShuoX ramoops_get_next_prz get the prz according the paramters. If it get a uninitialized prz

Re: [PATCH] pstore: reset ftrace_read_cnt at ramoops_pstore_open

2014-03-06 Thread Liu ShuoX
On Tue 4.Mar'14 at 11:11:11 -0800, Kees Cook wrote: On Mon, Mar 3, 2014 at 5:40 PM, Liu ShuoX wrote: On Mon 3.Mar'14 at 11:45:59 -0800, Kees Cook wrote: On Thu, Feb 27, 2014 at 10:37 PM, wrote: From: Liu ShuoX ftrace_read_cnt need to be reset in open to support mutli tim

Re: [PATCH] pstore: reset ftrace_read_cnt at ramoops_pstore_open

2014-03-03 Thread Liu ShuoX
On Mon 3.Mar'14 at 11:45:59 -0800, Kees Cook wrote: On Thu, Feb 27, 2014 at 10:37 PM, wrote: From: Liu ShuoX ftrace_read_cnt need to be reset in open to support mutli times getting the records. Signed-off-by: Liu ShuoX --- fs/pstore/ram.c | 1 + 1 file changed, 1 insertion(+)