Re: [PATCH 3.16 298/366] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-11-12 Thread Snild Dolkow
On 11/11/18 8:49 PM, Ben Hutchings wrote: > 3.16.61-rc1 review patch. If anyone has any objections, please let me know. > > -- > > From: Snild Dolkow > > commit 3e536e222f2930534c252c1cc7ae799c725c5ff9 upstream. > > There is a window for racing whe

Re: [PATCH 3.16 298/366] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-11-12 Thread Snild Dolkow
On 11/11/18 8:49 PM, Ben Hutchings wrote: > 3.16.61-rc1 review patch. If anyone has any objections, please let me know. > > -- > > From: Snild Dolkow > > commit 3e536e222f2930534c252c1cc7ae799c725c5ff9 upstream. > > There is a window for racing whe

[PATCH] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-26 Thread Snild Dolkow
ay, there won't be a window where comm is not terminated. Cc: sta...@vger.kernel.org Fixes: bc0c38d139ec7 ("ftrace: latency tracer infrastructure") Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Snild Dolkow --- kernel/kthread.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -

[PATCH] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-26 Thread Snild Dolkow
ay, there won't be a window where comm is not terminated. Cc: sta...@vger.kernel.org Fixes: bc0c38d139ec7 ("ftrace: latency tracer infrastructure") Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Snild Dolkow --- kernel/kthread.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -

[PATCH v2] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
ay, there won't be a window where comm is not terminated. Signed-off-by: Snild Dolkow --- kernel/kthread.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 481951bf091d..1a481ae12dec 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @

[PATCH v2] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
ay, there won't be a window where comm is not terminated. Signed-off-by: Snild Dolkow --- kernel/kthread.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 481951bf091d..1a481ae12dec 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
On 07/24/2018 04:48 PM, Steven Rostedt wrote: > On Tue, 24 Jul 2018 10:17:37 +0200 > Snild Dolkow wrote: > >> creator other >> vsnprintf: >>fill (not terminated) >>count the restread/use com

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
On 07/24/2018 04:48 PM, Steven Rostedt wrote: > On Tue, 24 Jul 2018 10:17:37 +0200 > Snild Dolkow wrote: > >> creator other >> vsnprintf: >>fill (not terminated) >>count the restread/use com

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
On 07/23/2018 06:41 PM, Steven Rostedt wrote: > On Mon, 23 Jul 2018 17:49:36 +0200 > Snild Dolkow wrote: >> Any issues with the commit message? Reading it back again now, it doesn't >> seem quite as clear as when I wrote it. > > Yeah, I think it does need some updates:

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-24 Thread Snild Dolkow
On 07/23/2018 06:41 PM, Steven Rostedt wrote: > On Mon, 23 Jul 2018 17:49:36 +0200 > Snild Dolkow wrote: >> Any issues with the commit message? Reading it back again now, it doesn't >> seem quite as clear as when I wrote it. > > Yeah, I think it does need some updates:

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
On 07/23/2018 05:37 PM, Steven Rostedt wrote: > On Mon, 23 Jul 2018 16:23:09 +0200 > Snild Dolkow wrote: > >> On 07/23/2018 03:55 PM, Steven Rostedt wrote: >> >>> Can you add a comment here stating something to the affect of: >>>

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
On 07/23/2018 05:37 PM, Steven Rostedt wrote: > On Mon, 23 Jul 2018 16:23:09 +0200 > Snild Dolkow wrote: > >> On 07/23/2018 03:55 PM, Steven Rostedt wrote: >> >>> Can you add a comment here stating something to the affect of: >>>

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
On 07/23/2018 03:55 PM, Steven Rostedt wrote: > Can you add a comment here stating something to the affect of: > /* task is now visible to other tasks */ > > -- Steve Sure, but isn't that a bit misleading? It will have been visible since some unknown point in time between waking up

Re: [PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
On 07/23/2018 03:55 PM, Steven Rostedt wrote: > Can you add a comment here stating something to the affect of: > /* task is now visible to other tasks */ > > -- Steve Sure, but isn't that a bit misleading? It will have been visible since some unknown point in time between waking up

[PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
use stack corruption when strcpy'd out of there. The workaround in e09e28671 (use strlcpy in __trace_find_cmdline) was likely needed because of this bug. Solved by vsnprintf:ing to a local buffer, then using set_task_comm(). Signed-off-by: Snild Dolkow --- kernel/kthread.c | 4 +++- 1 file changed

[PATCH RESEND] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-23 Thread Snild Dolkow
use stack corruption when strcpy'd out of there. The workaround in e09e28671 (use strlcpy in __trace_find_cmdline) was likely needed because of this bug. Solved by vsnprintf:ing to a local buffer, then using set_task_comm(). Signed-off-by: Snild Dolkow --- kernel/kthread.c | 4 +++- 1 file changed

[PATCH] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-04 Thread Snild Dolkow
use stack corruption when strcpy'd out of there. The workaround in e09e28671 (use strlcpy in __trace_find_cmdline) was likely needed because of this bug. Solved by vsnprintf:ing to a local buffer, then using set_task_comm(). Signed-off-by: Snild Dolkow --- kernel/kthread.c | 4 +++- 1 file changed

[PATCH] kthread, tracing: Don't expose half-written comm when creating kthreads

2018-07-04 Thread Snild Dolkow
use stack corruption when strcpy'd out of there. The workaround in e09e28671 (use strlcpy in __trace_find_cmdline) was likely needed because of this bug. Solved by vsnprintf:ing to a local buffer, then using set_task_comm(). Signed-off-by: Snild Dolkow --- kernel/kthread.c | 4 +++- 1 file changed