[PATCH] powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

2020-09-28 Thread zhe.he
From: He Zhe The user defined label following "fallthrough" is not considered by GCC and causes build failure. kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror] 208 define fallthrough

[PATCH] SUNRPC: Flush dcache only when receiving more seeking

2020-09-18 Thread zhe.he
From: He Zhe commit ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()") introduces svc_flush_bvec to after sock_recvmsg, but sometimes we receive less than we seek, which triggers the following warning. WARNING: CPU: 0 PID: 18266 at include/linux/bvec.h:101 bvec_iter_advance+0x44/0xa8 Attempted

[PATCH] mips/oprofile: Fix fallthrough placement

2020-08-20 Thread zhe.he
From: He Zhe We want neither " include/linux/compiler_attributes.h:201:41: warning: statement will never be executed [-Wswitch-unreachable] 201 | # define fallthrough __attribute__((__fallthrough__)) | ^ " nor " include/linux/compiler_attributes.h:201:41:

[PATCH] freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS

2020-07-06 Thread zhe.he
From: He Zhe commit 0688e64bc600 ("NFS: Allow signal interruption of NFS4ERR_DELAYed operations") introduces nfs4_delay_interruptible which also needs an _unsafe version to avoid the following call trace for the same reason explained in commit 416ad3c9c006 ("freezer: add unsafe versions of

[PATCH RT] printk: devkmsg: read: Return EPIPE when the first message user-space wants has gone

2019-09-24 Thread zhe.he
From: He Zhe When user-space wants to read the first message, that is when user->seq is 0, and that message has gone, it currently automatically resets user->seq to current first seq. This mis-aligns with mainline kernel.

[PATCH] printk: Fix unnecessary returning broken pipe error from devkmsg_read

2019-09-18 Thread zhe.he
From: He Zhe When users read the buffer from start, there is no need to return -EPIPE since the possible overflows will not affect the output. Signed-off-by: He Zhe --- kernel/printk/printk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/printk/printk.c

[PATCH] modules: page-align module section allocations only for arches supporting strict module rwx

2019-08-20 Thread zhe.he
From: He Zhe We should keep the case of "#define debug_align(X) (X)" for all arches without CONFIG_HAS_STRICT_MODULE_RWX ability, which would save people, who are sensitive to system size, a lot of memory when using modules, especially for embedded systems. This is also the intention of the

[PATCH] gcc-plugins: Enable error message print

2019-08-13 Thread zhe.he
From: He Zhe Instead of sliently emptying CONFIG_PLUGIN_HOSTCC which is the dependency of a series of configurations, the following error message would be easier for users to find something is wrong and what is happening. scripts/gcc-plugins/gcc-common.h:5:22: fatal error: bversion.h: No such

[PATCH] ARM: module: Avoid W and X mappings at the beginning

2019-08-10 Thread zhe.he
From: He Zhe It is more secure to map module memory as not-execute at the beginning. Memory sections that need to be executable will be turned to executable later in complete_formation. This is a corresponding change for ARM to the following commit commit f2c65fb3221a ("x86/modules: Avoid

[PATCH] module: Fix load failure when CONFIG_STRICT_MODULE_RWX is diabled

2019-08-10 Thread zhe.he
From: He Zhe When loading modules with CONFIG_ARCH_HAS_STRICT_MODULE_RWX enabled and CONFIG_STRICT_MODULE_RWX disabled, the memory allocated for modules would not be page-aligned and cause the following BUG during frob_text. [ cut here ] kernel BUG at

[PATCH] nfsd4: Fix kernel crash when reading proc file reply_cache_stats

2019-08-06 Thread zhe.he
From: He Zhe reply_cache_stats uses wrong parameter as seq file private structure and thus causes the following kernel crash when users read /proc/fs/nfsd/reply_cache_stats BUG: kernel NULL pointer dereference, address: 01f9 PGD 0 P4D 0 Oops: [#3] SMP PTI CPU: 6 PID: 1502 Comm:

[PATCH] nfsd4: Fix kernel crash when reading proc file reply_cache_stats

2019-08-06 Thread zhe.he
From: He Zhe reply_cache_stats uses wrong parameter as seq file private structure and thus causes the following kernel crash when users read /proc/fs/nfsd/reply_cache_stats m=a2ec03f7 v=f5777155 BUG: kernel NULL pointer dereference, address: 01f9 PGD 0 P4D 0 Oops:

[PATCH 2/2] perf: Fix writing to illegal memory in handling cpumap mask

2019-08-02 Thread zhe.he
From: He Zhe cpu_map__snprint_mask would write to illegal memory pointed by zalloc(0) when there is only one cpu. This patch fixes the calculation and adds sanity check against the input parameters. Signed-off-by: He Zhe --- tools/perf/util/cpumap.c | 5 - 1 file changed, 4

[PATCH 1/2] perf: Fix failure to set cpumask when only one cpu

2019-08-02 Thread zhe.he
From: He Zhe The buffer containing string used to set cpumask is overwritten by end of string later in cpu_map__snprint_mask due to not enough memory space, when there is only one cpu. And thus causes the following failure. $ perf ftrace ls failed to reset ftrace This patch fixes the

[PATCH] netfilter: Fix remainder of pseudo-header protocol 0

2019-06-23 Thread zhe.he
From: He Zhe Since v5.1-rc1, some types of packets do not get unreachable reply with the following iptables setting. Fox example, $ iptables -A INPUT -p icmp --icmp-type 8 -j REJECT $ ping 127.0.0.1 -c 1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. — 127.0.0.1 ping statistics — 1 packets

[PATCH] serial: 8250: Fix serial8250 initialization crash

2019-01-17 Thread zhe.he
From: He Zhe The initialization code of interrupt backoff work might reference NULL pointer and cause the following crash, if no port was found. [ 10.017727] CPU 0 Unable to handle kernel paging request at virtual address 01b0, epc == 807088e0, ra == 8070863c snip [

[PATCH] mm: kmemleak: Turn kmemleak_lock to spin lock and RCU primitives

2019-01-04 Thread zhe.he
From: He Zhe It's not necessary to keep consistency between readers and writers of kmemleak_lock. RCU is more proper for this case. And in order to gain better performance, we turn the reader locks to RCU read locks and writer locks to normal spin locks. "time echo scan >

[PATCH] perf/x86/intel: Avoid unnecessary reallocations of memory allocated in cpu hotplug prepare state

2018-12-18 Thread zhe.he
From: He Zhe The memory of shared_regs excl_cntrs and constraint_list in struct cpu_hw_events is currently allocated in hotplug prepare state and freed in dying state. The memory can actually be reused across multiple cpu pluggings. Besides, in preempt-rt full mode, the freeing can happen in

[PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-22 Thread zhe.he
From: He Zhe kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. BUG: scheduling while atomic: migration/15/132/0x0002 Modules linked in: iTCO_wdt iTCO_vendor_support intel_rapl pcc_cpufreq pnd2_edac intel_powerclamp coretemp crct10dif_pclmul

[PATCH v2] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-22 Thread zhe.he
From: He Zhe kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. BUG: scheduling while atomic: migration/15/132/0x0002 Modules linked in: iTCO_wdt iTCO_vendor_support intel_rapl pcc_cpufreq pnd2_edac intel_powerclamp coretemp crct10dif_pclmul

[PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-12 Thread zhe.he
From: He Zhe kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. BUG: scheduling while atomic: migration/15/132/0x0002 Modules linked in: iTCO_wdt iTCO_vendor_support intel_rapl pcc_cpufreq pnd2_edac intel_powerclamp coretemp crct10dif_pclmul

[PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT

2018-11-12 Thread zhe.he
From: He Zhe kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. BUG: scheduling while atomic: migration/15/132/0x0002 Modules linked in: iTCO_wdt iTCO_vendor_support intel_rapl pcc_cpufreq pnd2_edac intel_powerclamp coretemp crct10dif_pclmul

[PATCH v5 3/4] printk: Add KBUILD_MODNAME and remove a redundant print prefix

2018-09-29 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/printk/printk.c

[PATCH v5 3/4] printk: Add KBUILD_MODNAME and remove a redundant print prefix

2018-09-29 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/printk/printk.c

[PATCH v5 4/4] printk: Give error on attempt to set log buffer length to over 4G

2018-09-29 Thread zhe.he
From: He Zhe Give explicit error for users who want to use larger log buffer. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v5 1/4] printk: Fix panic caused by passing log_buf_len to command line

2018-09-29 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v5 2/4] printk: Correct wrong casting

2018-09-29 Thread zhe.he
From: He Zhe Correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: sta...@vger.kernel.org Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v5 4/4] printk: Give error on attempt to set log buffer length to over 4G

2018-09-29 Thread zhe.he
From: He Zhe Give explicit error for users who want to use larger log buffer. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v5 1/4] printk: Fix panic caused by passing log_buf_len to command line

2018-09-29 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v5 2/4] printk: Correct wrong casting

2018-09-29 Thread zhe.he
From: He Zhe Correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: sta...@vger.kernel.org Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v4 2/4] printk: Correct wrong casting

2018-09-29 Thread zhe.he
From: He Zhe Correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: sta...@vger.kernel.org Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v4 1/4] printk: Fix panic caused by passing log_buf_len to command line

2018-09-29 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v4 2/4] printk: Correct wrong casting

2018-09-29 Thread zhe.he
From: He Zhe Correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: sta...@vger.kernel.org Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v4 1/4] printk: Fix panic caused by passing log_buf_len to command line

2018-09-29 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v4 3/4] printk: Add KBUILD_MODNAME

2018-09-29 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index

[PATCH v4 4/4] printk: Give error on attempt to set log buffer length to over 4G

2018-09-29 Thread zhe.he
From: He Zhe Give explicit error for users who want to use larger log buffer. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v4 3/4] printk: Add KBUILD_MODNAME

2018-09-29 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index

[PATCH v4 4/4] printk: Give error on attempt to set log buffer length to over 4G

2018-09-29 Thread zhe.he
From: He Zhe Give explicit error for users who want to use larger log buffer. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- kernel/printk/printk.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v2 2/2] printk: Add KBUILD_MODNAME and correct wrong casting

2018-09-28 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear and correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct wrong cast in sprintf kernel/printk/printk.c | 7

[PATCH v2 2/2] printk: Add KBUILD_MODNAME and correct wrong casting

2018-09-28 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear and correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct wrong cast in sprintf kernel/printk/printk.c | 7

[PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-28 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-28 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v3 2/2] printk: Add KBUILD_MODNAME and correct wrong casting

2018-09-22 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear and correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct one more place v3: Correct wrong casting

[PATCH v3 2/2] printk: Add KBUILD_MODNAME and correct wrong casting

2018-09-22 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear and correct wrong casting that might cut off the normal output. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct one more place v3: Correct wrong casting

[PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-22 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v3 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-22 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v2 2/2] mm/page_alloc: Add KBUILD_MODNAME

2018-09-22 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: a...@linux-foundation.org Cc: mho...@suse.com Cc: vba...@suse.cz Cc: pasha.tatas...@oracle.com Cc: mgor...@techsingularity.net Cc: aaron...@intel.com Cc: osalva...@suse.de Cc: iamjoonsoo@lge.com --- v2:

[PATCH v2 2/2] mm/page_alloc: Add KBUILD_MODNAME

2018-09-22 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. Signed-off-by: He Zhe Cc: a...@linux-foundation.org Cc: mho...@suse.com Cc: vba...@suse.cz Cc: pasha.tatas...@oracle.com Cc: mgor...@techsingularity.net Cc: aaron...@intel.com Cc: osalva...@suse.de Cc: iamjoonsoo@lge.com --- v2:

[PATCH v2 1/2] mm/page_alloc: Fix panic caused by passing debug_guardpage_minorder or kernelcore to command line

2018-09-22 Thread zhe.he
From: He Zhe debug_guardpage_minorder_setup and cmdline_parse_kernelcore do not check input argument before using it. The argument would be a NULL pointer if "debug_guardpage_minorder" or "kernelcore", without its value, is set in command line and thus causes the following panic. PANIC: early

[PATCH v2 1/2] mm/page_alloc: Fix panic caused by passing debug_guardpage_minorder or kernelcore to command line

2018-09-22 Thread zhe.he
From: He Zhe debug_guardpage_minorder_setup and cmdline_parse_kernelcore do not check input argument before using it. The argument would be a NULL pointer if "debug_guardpage_minorder" or "kernelcore", without its value, is set in command line and thus causes the following panic. PANIC: early

[PATCH v2 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-18 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v2 1/2] printk: Fix panic caused by passing log_buf_len to command line

2018-09-18 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH v2 2/2] printk: Add KBUILD_MODNAME and correct bare use of unsigned

2018-09-18 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. And use 'unsigned int' intead of 'unsigned' according to checkpatch.pl's suggestion. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct one more place

[PATCH v2 2/2] printk: Add KBUILD_MODNAME and correct bare use of unsigned

2018-09-18 Thread zhe.he
From: He Zhe Add KBUILD_MODNAME to make prints more clear. And use 'unsigned int' intead of 'unsigned' according to checkpatch.pl's suggestion. Signed-off-by: He Zhe Cc: pmla...@suse.com Cc: sergey.senozhat...@gmail.com Cc: rost...@goodmis.org --- v2: Correct one more place

[PATCH] printk: Fix panic caused by passing log_buf_len to command line

2018-09-18 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH] printk: Fix panic caused by passing log_buf_len to command line

2018-09-18 Thread zhe.he
From: He Zhe log_buf_len_setup does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "log_buf_len", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:aaeacd0d error 0 cr2

[PATCH] mm/page_alloc: Fix panic caused by passing debug_guardpage_minorder or kernelcore to command line

2018-09-18 Thread zhe.he
From: He Zhe debug_guardpage_minorder_setup and cmdline_parse_kernelcore do not check input argument before using it. The argument would be a NULL pointer if "debug_guardpage_minorder" or "kernelcore", without its value, is set in command line and thus causes the following panic. PANIC: early

[PATCH] mm/page_alloc: Fix panic caused by passing debug_guardpage_minorder or kernelcore to command line

2018-09-18 Thread zhe.he
From: He Zhe debug_guardpage_minorder_setup and cmdline_parse_kernelcore do not check input argument before using it. The argument would be a NULL pointer if "debug_guardpage_minorder" or "kernelcore", without its value, is set in command line and thus causes the following panic. PANIC: early

[PATCH] kernel/dma: Fix panic caused by passing swiotlb to command line

2018-09-16 Thread zhe.he
From: He Zhe setup_io_tlb_npages does not check input argument before passing it to isdigit. The argument would be a NULL pointer if "swiotlb", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:bb9b8e9f error 0 cr2 0x0 [

[PATCH] kernel/dma: Fix panic caused by passing swiotlb to command line

2018-09-16 Thread zhe.he
From: He Zhe setup_io_tlb_npages does not check input argument before passing it to isdigit. The argument would be a NULL pointer if "swiotlb", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:bb9b8e9f error 0 cr2 0x0 [

[PATCH] kernel/dma: Fix panic caused by passing cma to command line

2018-09-16 Thread zhe.he
From: He Zhe early_cma does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "cma", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:a3e9db8d error 0 cr2 0x0 [

[PATCH] kernel/dma: Fix panic caused by passing cma to command line

2018-09-16 Thread zhe.he
From: He Zhe early_cma does not check input argument before passing it to simple_strtoull. The argument would be a NULL pointer if "cma", without its value, is set in command line and thus causes the following panic. PANIC: early exception 0xe3 IP 10:a3e9db8d error 0 cr2 0x0 [

[PATCH v2 2/2] x86: corruption-check: Change printk to the right fashion

2018-08-14 Thread zhe.he
From: He Zhe pr_* is preferred according to scripts/checkpatch.pl. Signed-off-by: He Zhe --- v2: - Split printk cleanups into a single patch - Add pr_fmt for mod name arch/x86/kernel/check.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH v2 2/2] x86: corruption-check: Change printk to the right fashion

2018-08-14 Thread zhe.he
From: He Zhe pr_* is preferred according to scripts/checkpatch.pl. Signed-off-by: He Zhe --- v2: - Split printk cleanups into a single patch - Add pr_fmt for mod name arch/x86/kernel/check.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH v2 1/2] x86: corruption-check: Passing memory_corruption_check to command line causes panic

2018-08-14 Thread zhe.he
From: He Zhe memory_corruption_check[{_period|_size}]'s handlers do not check input argument before passing it to kstrtoul or simple_strtoull. The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic.

[PATCH v2 1/2] x86: corruption-check: Passing memory_corruption_check to command line causes panic

2018-08-14 Thread zhe.he
From: He Zhe memory_corruption_check[{_period|_size}]'s handlers do not check input argument before passing it to kstrtoul or simple_strtoull. The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic.

[PATCH] scripts/gcc-goto.sh: Show stdout and stderr for potential errors

2018-08-09 Thread zhe.he
From: He Zhe The check may fail not only because ${CC} does not support the asm feature, but also due to potential defects of ${CC} itself like what we experienced below or even it's missing. Assembler messages: Fatal error: The input and output files must be distinct (introduced by

[PATCH] scripts/gcc-goto.sh: Show stdout and stderr for potential errors

2018-08-09 Thread zhe.he
From: He Zhe The check may fail not only because ${CC} does not support the asm feature, but also due to potential defects of ${CC} itself like what we experienced below or even it's missing. Assembler messages: Fatal error: The input and output files must be distinct (introduced by

[PATCH] x86: corruption-check: Passing memory_corruption_check to command line causes panic

2018-08-08 Thread zhe.he
From: He Zhe memory_corruption_check[{_period|_size}]'s handlers do not check input argument before passing it to kstrtoul or simple_strtoull. The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic.

[PATCH] x86: corruption-check: Passing memory_corruption_check to command line causes panic

2018-08-08 Thread zhe.he
From: He Zhe memory_corruption_check[{_period|_size}]'s handlers do not check input argument before passing it to kstrtoul or simple_strtoull. The argument would be a NULL pointer if each of the kernel parameters, without its value, is set in command line and thus cause the following panic.

[PATCH] kgdboc: Passing ekgdboc to command line causes panic

2018-08-08 Thread zhe.he
From: He Zhe kgdboc_option_setup does not check input argument before passing it to strlen. The argument would be a NULL pointer if "ekgdboc", without its value, is set in command line and thus cause the following panic. PANIC: early exception 0xe3 IP 10:8fbbb620 error 0 cr2 0x0 [

[PATCH] kgdboc: Passing ekgdboc to command line causes panic

2018-08-08 Thread zhe.he
From: He Zhe kgdboc_option_setup does not check input argument before passing it to strlen. The argument would be a NULL pointer if "ekgdboc", without its value, is set in command line and thus cause the following panic. PANIC: early exception 0xe3 IP 10:8fbbb620 error 0 cr2 0x0 [

[PATCH 1/1] x86, kgdb: correct kgdb_arch_remove_breakpoint

2014-12-29 Thread zhe.he
From: He Zhe On 3.19-rc2, kgdbts boot time test fails with default parameter V1F100 "KGDB: BP remove failed: 81049070" Then system is hanged. When CONFIG_DEBUG_RODATA is on, kgdb_arch_set_breakpoint firstly tries probe_kernel_write to set breakpoints and mark their type as

[PATCH 1/1] x86, kgdb: correct kgdb_arch_remove_breakpoint

2014-12-29 Thread zhe.he
From: He Zhe zhe...@windriver.com On 3.19-rc2, kgdbts boot time test fails with default parameter V1F100 KGDB: BP remove failed: 81049070 Then system is hanged. When CONFIG_DEBUG_RODATA is on, kgdb_arch_set_breakpoint firstly tries probe_kernel_write to set breakpoints and mark their