* [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy
@ 2013-04-08 4:12 Chen Gang
2013-04-08 15:31 ` [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() tip-bot for Chen Gang
2013-04-09 15:00 ` [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Steven Rostedt
0 siblings, 2 replies; 5+ messages in thread
From: Chen Gang @ 2013-04-08 4:12 UTC (permalink / raw)
To: rostedt, Frederic Weisbecker, mingo, linux-kernel
for NUL terminated string, need always set '\0' at the end.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
kernel/trace/ftrace.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index dfd33f0..fa984b7 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3492,14 +3492,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
static int __init set_ftrace_notrace(char *str)
{
- strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
+ strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
return 1;
}
__setup("ftrace_notrace=", set_ftrace_notrace);
static int __init set_ftrace_filter(char *str)
{
- strncpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
+ strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
return 1;
}
__setup("ftrace_filter=", set_ftrace_filter);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
2013-04-08 4:12 [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Chen Gang
@ 2013-04-08 15:31 ` tip-bot for Chen Gang
2013-04-09 1:38 ` Chen Gang
2013-04-09 15:00 ` [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Steven Rostedt
1 sibling, 1 reply; 5+ messages in thread
From: tip-bot for Chen Gang @ 2013-04-08 15:31 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, fweisbec, gang.chen, tglx
Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471
Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471
Author: Chen Gang <gang.chen@asianux.com>
AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 8 Apr 2013 13:26:56 +0200
ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
For NUL terminated string we always need to set '\0' at the end.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: rostedt@goodmis.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/516243B7.9020405@asianux.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/trace/ftrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6893d5a..db14374 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3441,14 +3441,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
static int __init set_ftrace_notrace(char *str)
{
- strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
+ strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
return 1;
}
__setup("ftrace_notrace=", set_ftrace_notrace);
static int __init set_ftrace_filter(char *str)
{
- strncpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
+ strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
return 1;
}
__setup("ftrace_filter=", set_ftrace_filter);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
2013-04-08 15:31 ` [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() tip-bot for Chen Gang
@ 2013-04-09 1:38 ` Chen Gang
0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-04-09 1:38 UTC (permalink / raw)
To: mingo, hpa, linux-kernel, fweisbec, gang.chen, tglx
Cc: tip-bot for Chen Gang, linux-tip-commits
On 2013年04月08日 23:31, tip-bot for Chen Gang wrote:
> Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471
> Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471
> Author: Chen Gang <gang.chen@asianux.com>
> AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Mon, 8 Apr 2013 13:26:56 +0200
>
> ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()
>
> For NUL terminated string we always need to set '\0' at the end.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Cc: rostedt@goodmis.org
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Link: http://lkml.kernel.org/r/516243B7.9020405@asianux.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
thank you very much for applying the 3 related patches.
--
Chen Gang
Asianux Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy
2013-04-08 4:12 [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Chen Gang
2013-04-08 15:31 ` [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() tip-bot for Chen Gang
@ 2013-04-09 15:00 ` Steven Rostedt
2013-04-10 6:25 ` Chen Gang F T
1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2013-04-09 15:00 UTC (permalink / raw)
To: Chen Gang; +Cc: Frederic Weisbecker, mingo, linux-kernel
I'll queue this up for my 3.10 queue. I'm going to merge this patch with
the previous patch you sent that updates trace.c
Thanks,
-- Steve
On Mon, 2013-04-08 at 12:12 +0800, Chen Gang wrote:
> for NUL terminated string, need always set '\0' at the end.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> kernel/trace/ftrace.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index dfd33f0..fa984b7 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -3492,14 +3492,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
>
> static int __init set_ftrace_notrace(char *str)
> {
> - strncpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
> + strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE);
> return 1;
> }
> __setup("ftrace_notrace=", set_ftrace_notrace);
>
> static int __init set_ftrace_filter(char *str)
> {
> - strncpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
> + strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE);
> return 1;
> }
> __setup("ftrace_filter=", set_ftrace_filter);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy
2013-04-09 15:00 ` [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Steven Rostedt
@ 2013-04-10 6:25 ` Chen Gang F T
0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang F T @ 2013-04-10 6:25 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Chen Gang, Frederic Weisbecker, mingo, linux-kernel
On 2013年04月09日 23:00, Steven Rostedt wrote:
> I'll queue this up for my 3.10 queue. I'm going to merge this patch with
> the previous patch you sent that updates trace.c
>
> Thanks,
>
> -- Steve
thanks too.
--
Chen Gang
Flying Transformer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-10 6:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08 4:12 [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Chen Gang
2013-04-08 15:31 ` [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() tip-bot for Chen Gang
2013-04-09 1:38 ` Chen Gang
2013-04-09 15:00 ` [PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy Steven Rostedt
2013-04-10 6:25 ` Chen Gang F T
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).