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

2018-09-29 Thread Sergey Senozhatsky
On (09/28/18 22:46), zhe...@windriver.com wrote: > This patch adds a check to prevent the panic and a check to report if someone > is > setting it over 4G. OK, He Zhe, you are almost there. Let's do the series the following way: - four patches - each change goes into a separate patch - the

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

2018-09-29 Thread Sergey Senozhatsky
On (09/28/18 22:46), zhe...@windriver.com wrote: > This patch adds a check to prevent the panic and a check to report if someone > is > setting it over 4G. OK, He Zhe, you are almost there. Let's do the series the following way: - four patches - each change goes into a separate patch - the

[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

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

2018-09-25 Thread Petr Mladek
On Tue 2018-09-25 20:38:40, Sergey Senozhatsky wrote: > On (09/22/18 23:40), zhe...@windriver.com wrote: > > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > > /* save requested log_buf_len since it's too early to process it */ > > static int __init

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

2018-09-25 Thread Petr Mladek
On Tue 2018-09-25 20:38:40, Sergey Senozhatsky wrote: > On (09/22/18 23:40), zhe...@windriver.com wrote: > > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > > /* save requested log_buf_len since it's too early to process it */ > > static int __init

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

2018-09-25 Thread Sergey Senozhatsky
On (09/22/18 23:40), zhe...@windriver.com wrote: > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > /* save requested log_buf_len since it's too early to process it */ > static int __init log_buf_len_setup(char *str) > { > - unsigned size = memparse(str, ); > +

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

2018-09-25 Thread Sergey Senozhatsky
On (09/22/18 23:40), zhe...@windriver.com wrote: > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > /* save requested log_buf_len since it's too early to process it */ > static int __init log_buf_len_setup(char *str) > { > - unsigned size = memparse(str, ); > +

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

2018-09-25 Thread Petr Mladek
On Sat 2018-09-22 23:40:51, zhe...@windriver.com wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 9bf5404..d9821c0 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > /*

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

2018-09-25 Thread Petr Mladek
On Sat 2018-09-22 23:40:51, zhe...@windriver.com wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 9bf5404..d9821c0 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1048,7 +1048,14 @@ static void __init log_buf_len_update(unsigned size) > /*

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

2018-09-24 Thread Steven Rostedt
On Sun, 23 Sep 2018 14:51:12 +0800 He Zhe wrote: > On 2018年09月23日 00:19, Steven Rostedt wrote: > > On Sat, 22 Sep 2018 23:40:51 +0800 > > wrote: > > > >> From: He Zhe > >> > >> log_buf_len_setup does not check input argument before passing it to > >> simple_strtoull. The argument would be a

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

2018-09-24 Thread Steven Rostedt
On Sun, 23 Sep 2018 14:51:12 +0800 He Zhe wrote: > On 2018年09月23日 00:19, Steven Rostedt wrote: > > On Sat, 22 Sep 2018 23:40:51 +0800 > > wrote: > > > >> From: He Zhe > >> > >> log_buf_len_setup does not check input argument before passing it to > >> simple_strtoull. The argument would be a

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

2018-09-23 Thread He Zhe
On 2018年09月23日 00:19, Steven Rostedt wrote: > On Sat, 22 Sep 2018 23:40:51 +0800 > wrote: > >> 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

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

2018-09-23 Thread He Zhe
On 2018年09月23日 00:19, Steven Rostedt wrote: > On Sat, 22 Sep 2018 23:40:51 +0800 > wrote: > >> 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

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

2018-09-22 Thread Steven Rostedt
On Sat, 22 Sep 2018 23:40:51 +0800 wrote: > 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. > >

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

2018-09-22 Thread Steven Rostedt
On Sat, 22 Sep 2018 23:40:51 +0800 wrote: > 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. > >

[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