Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-20 Thread Dan Carpenter
Hi Michal, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Michal-Kubecek/proc-add-missing-0-back-to-proc-pid-cmdline/20180620-015310 New smatch warnings: fs/proc/base.c:248 get_mm_cmdline() error: uninitialized symbol 'pos'. Old smatch

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-20 Thread Dan Carpenter
Hi Michal, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Michal-Kubecek/proc-add-missing-0-back-to-proc-pid-cmdline/20180620-015310 New smatch warnings: fs/proc/base.c:248 get_mm_cmdline() error: uninitialized symbol 'pos'. Old smatch

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-20 Thread Michal Kubecek
On Wed, Jun 20, 2018 at 02:51:23PM +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 2:08 PM Michal Kubecek wrote: > > > > > > > @@ -254,10 +258,19 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, > > > char __user *buf, > > > while (count) { > > > int got; > > >

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-20 Thread Michal Kubecek
On Wed, Jun 20, 2018 at 02:51:23PM +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 2:08 PM Michal Kubecek wrote: > > > > > > > @@ -254,10 +258,19 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, > > > char __user *buf, > > > while (count) { > > > int got; > > >

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Linus Torvalds
On Wed, Jun 20, 2018 at 2:08 PM Michal Kubecek wrote: > > > > @@ -254,10 +258,19 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, > > char __user *buf, > > while (count) { > > int got; > > size_t size = min_t(size_t, PAGE_SIZE, count); > > We limit size to

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Linus Torvalds
On Wed, Jun 20, 2018 at 2:08 PM Michal Kubecek wrote: > > > > @@ -254,10 +258,19 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, > > char __user *buf, > > while (count) { > > int got; > > size_t size = min_t(size_t, PAGE_SIZE, count); > > We limit size to

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Michal Kubecek
On Wed, Jun 20, 2018 at 06:56:04AM +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 1:24 AM Michal Kubecek wrote: > > > > Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the > > trailing null character: > > > > mike@lion:/tmp> cat /proc/self/cmdline | od -t c > >

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Michal Kubecek
On Wed, Jun 20, 2018 at 06:56:04AM +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 1:24 AM Michal Kubecek wrote: > > > > Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the > > trailing null character: > > > > mike@lion:/tmp> cat /proc/self/cmdline | od -t c > >

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Linus Torvalds
On Wed, Jun 20, 2018 at 1:24 AM Michal Kubecek wrote: > > Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the > trailing null character: > > mike@lion:/tmp> cat /proc/self/cmdline | od -t c > 000 c a t \0 / p r o c / s e l f / c > 020

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Linus Torvalds
On Wed, Jun 20, 2018 at 1:24 AM Michal Kubecek wrote: > > Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the > trailing null character: > > mike@lion:/tmp> cat /proc/self/cmdline | od -t c > 000 c a t \0 / p r o c / s e l f / c > 020

[PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Michal Kubecek
Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the trailing null character: mike@lion:/tmp> cat /proc/self/cmdline | od -t c 000 c a t \0 / p r o c / s e l f / c 020 m d l i n e 026 This is because strnlen() is used to

[PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread Michal Kubecek
Recent rewrite introduced a regression, /proc/$pid/cmdline is missing the trailing null character: mike@lion:/tmp> cat /proc/self/cmdline | od -t c 000 c a t \0 / p r o c / s e l f / c 020 m d l i n e 026 This is because strnlen() is used to

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread kbuild test robot
Hi Michal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.18-rc1 next-20180619] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] proc: add missing '\0' back to /proc/$pid/cmdline

2018-06-19 Thread kbuild test robot
Hi Michal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.18-rc1 next-20180619] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: