[tip:x86/build] x86, defconfig: Add DEVTMPFS and DEVTMPFS_MOUNT to *86*_defconfig

2013-11-04 Thread tip-bot for Chen Gang
Commit-ID:  7f71be4c9f9a334e7bd0adc66225db4eb88c3bc4
Gitweb: http://git.kernel.org/tip/7f71be4c9f9a334e7bd0adc66225db4eb88c3bc4
Author: Chen Gang 
AuthorDate: Tue, 5 Nov 2013 09:46:39 +0800
Committer:  H. Peter Anvin 
CommitDate: Mon, 4 Nov 2013 20:01:55 -0800

x86, defconfig: Add DEVTMPFS and DEVTMPFS_MOUNT to *86*_defconfig

The defconfig kernel can not run under neither fedora16 x86_64 laptop
nor fedora17 x86_64 pc. After enable DEVTMPFS* in x86_64_defconfig, it
will be OK.

DEVTMPFS* is only related with software, so for i386_defconfig may also
need them (at least, it has no negative effect for defconfig).

Signed-off-by: Chen Gang 
Link: http://lkml.kernel.org/r/52784dff.8040...@asianux.com
Signed-off-by: H. Peter Anvin 
---
 arch/x86/configs/i386_defconfig   | 2 ++
 arch/x86/configs/x86_64_defconfig | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 9444708..a7fef26 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -142,6 +142,8 @@ CONFIG_MAC80211=y
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DEBUG_DEVRES=y
 CONFIG_CONNECTOR=y
 CONFIG_BLK_DEV_LOOP=y
diff --git a/arch/x86/configs/x86_64_defconfig 
b/arch/x86/configs/x86_64_defconfig
index 671524d..c1119d4 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -141,6 +141,8 @@ CONFIG_MAC80211=y
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DEBUG_DEVRES=y
 CONFIG_CONNECTOR=y
 CONFIG_BLK_DEV_LOOP=y
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:x86/build] x86, defconfig: Add DEVTMPFS and DEVTMPFS_MOUNT to *86*_defconfig

2013-11-04 Thread tip-bot for Chen Gang
Commit-ID:  7f71be4c9f9a334e7bd0adc66225db4eb88c3bc4
Gitweb: http://git.kernel.org/tip/7f71be4c9f9a334e7bd0adc66225db4eb88c3bc4
Author: Chen Gang gang.c...@asianux.com
AuthorDate: Tue, 5 Nov 2013 09:46:39 +0800
Committer:  H. Peter Anvin h...@zytor.com
CommitDate: Mon, 4 Nov 2013 20:01:55 -0800

x86, defconfig: Add DEVTMPFS and DEVTMPFS_MOUNT to *86*_defconfig

The defconfig kernel can not run under neither fedora16 x86_64 laptop
nor fedora17 x86_64 pc. After enable DEVTMPFS* in x86_64_defconfig, it
will be OK.

DEVTMPFS* is only related with software, so for i386_defconfig may also
need them (at least, it has no negative effect for defconfig).

Signed-off-by: Chen Gang gang.c...@asianux.com
Link: http://lkml.kernel.org/r/52784dff.8040...@asianux.com
Signed-off-by: H. Peter Anvin h...@zytor.com
---
 arch/x86/configs/i386_defconfig   | 2 ++
 arch/x86/configs/x86_64_defconfig | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 9444708..a7fef26 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -142,6 +142,8 @@ CONFIG_MAC80211=y
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=y
 CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DEBUG_DEVRES=y
 CONFIG_CONNECTOR=y
 CONFIG_BLK_DEV_LOOP=y
diff --git a/arch/x86/configs/x86_64_defconfig 
b/arch/x86/configs/x86_64_defconfig
index 671524d..c1119d4 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -141,6 +141,8 @@ CONFIG_MAC80211=y
 CONFIG_MAC80211_LEDS=y
 CONFIG_RFKILL=y
 CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DEBUG_DEVRES=y
 CONFIG_CONNECTOR=y
 CONFIG_BLK_DEV_LOOP=y
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] perf: Fix strncpy() use, always make sure it' s NUL terminated

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  c97847d2f0eb77c806e650e04d9bbcf79fa05730
Gitweb: http://git.kernel.org/tip/c97847d2f0eb77c806e650e04d9bbcf79fa05730
Author: Chen Gang 
AuthorDate: Mon, 8 Apr 2013 11:48:27 +0800
Committer:  Ingo Molnar 
CommitDate: Mon, 8 Apr 2013 13:26:55 +0200

perf: Fix strncpy() use, always make sure it's NUL terminated

For NUL terminated string, always make sure that there's '\0' at the end.

In our case we need a return value, so still use strncpy() and
fix up the tail explicitly.

(strlcpy() returns the size, not the pointer)

Signed-off-by: Chen Gang 
Cc: a.p.zijls...@chello.nl 
Cc: pau...@samba.org 
Cc: a...@ghostprotocols.net 
Link: http://lkml.kernel.org/r/51623e0b.7070...@asianux.com
Signed-off-by: Ingo Molnar 
---
 kernel/events/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 59412d0..7f0d67e 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4737,7 +4737,8 @@ static void perf_event_mmap_event(struct perf_mmap_event 
*mmap_event)
} else {
if (arch_vma_name(mmap_event->vma)) {
name = strncpy(tmp, arch_vma_name(mmap_event->vma),
-  sizeof(tmp));
+  sizeof(tmp) - 1);
+   tmp[sizeof(tmp) - 1] = '\0';
goto got_name;
}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  75761cc15877c155b3849b4e0e0cb3f897faf471
Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471
Author: Chen Gang 
AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800
Committer:  Ingo Molnar 
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 
Cc: rost...@goodmis.org
Cc: Frederic Weisbecker 
Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com
Signed-off-by: Ingo Molnar 
---
 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] perf: Fix strncpy() use, use strlcpy() instead of strncpy()

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  67012ab1d2ce871afea4ee55408f233f97d09d07
Gitweb: http://git.kernel.org/tip/67012ab1d2ce871afea4ee55408f233f97d09d07
Author: Chen Gang 
AuthorDate: Mon, 8 Apr 2013 12:06:44 +0800
Committer:  Ingo Molnar 
CommitDate: Mon, 8 Apr 2013 13:26:56 +0200

perf: 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 
Cc: rost...@goodmis.org
Cc: Frederic Weisbecker 
Link: http://lkml.kernel.org/r/51624254.30...@asianux.com
Signed-off-by: Ingo Molnar 
---
 kernel/trace/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4f1dade..3f5046a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -132,7 +132,7 @@ static char *default_bootup_tracer;
 
 static int __init set_cmdline_ftrace(char *str)
 {
-   strncpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
+   strlcpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
default_bootup_tracer = bootup_tracer_buf;
/* We are using ftrace early, expand it */
ring_buffer_expanded = 1;
@@ -162,7 +162,7 @@ static char *trace_boot_options __initdata;
 
 static int __init set_trace_boot_options(char *str)
 {
-   strncpy(trace_boot_options_buf, str, MAX_TRACER_SIZE);
+   strlcpy(trace_boot_options_buf, str, MAX_TRACER_SIZE);
trace_boot_options = trace_boot_options_buf;
return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] perf: Fix strncpy() use, use strlcpy() instead of strncpy()

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  67012ab1d2ce871afea4ee55408f233f97d09d07
Gitweb: http://git.kernel.org/tip/67012ab1d2ce871afea4ee55408f233f97d09d07
Author: Chen Gang gang.c...@asianux.com
AuthorDate: Mon, 8 Apr 2013 12:06:44 +0800
Committer:  Ingo Molnar mi...@kernel.org
CommitDate: Mon, 8 Apr 2013 13:26:56 +0200

perf: 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.c...@asianux.com
Cc: rost...@goodmis.org
Cc: Frederic Weisbecker fweis...@gmail.com
Link: http://lkml.kernel.org/r/51624254.30...@asianux.com
Signed-off-by: Ingo Molnar mi...@kernel.org
---
 kernel/trace/trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4f1dade..3f5046a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -132,7 +132,7 @@ static char *default_bootup_tracer;
 
 static int __init set_cmdline_ftrace(char *str)
 {
-   strncpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
+   strlcpy(bootup_tracer_buf, str, MAX_TRACER_SIZE);
default_bootup_tracer = bootup_tracer_buf;
/* We are using ftrace early, expand it */
ring_buffer_expanded = 1;
@@ -162,7 +162,7 @@ static char *trace_boot_options __initdata;
 
 static int __init set_trace_boot_options(char *str)
 {
-   strncpy(trace_boot_options_buf, str, MAX_TRACER_SIZE);
+   strlcpy(trace_boot_options_buf, str, MAX_TRACER_SIZE);
trace_boot_options = trace_boot_options_buf;
return 0;
 }
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  75761cc15877c155b3849b4e0e0cb3f897faf471
Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471
Author: Chen Gang gang.c...@asianux.com
AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800
Committer:  Ingo Molnar mi...@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.c...@asianux.com
Cc: rost...@goodmis.org
Cc: Frederic Weisbecker fweis...@gmail.com
Link: http://lkml.kernel.org/r/516243b7.9020...@asianux.com
Signed-off-by: Ingo Molnar mi...@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);
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/urgent] perf: Fix strncpy() use, always make sure it' s NUL terminated

2013-04-08 Thread tip-bot for Chen Gang
Commit-ID:  c97847d2f0eb77c806e650e04d9bbcf79fa05730
Gitweb: http://git.kernel.org/tip/c97847d2f0eb77c806e650e04d9bbcf79fa05730
Author: Chen Gang gang.c...@asianux.com
AuthorDate: Mon, 8 Apr 2013 11:48:27 +0800
Committer:  Ingo Molnar mi...@kernel.org
CommitDate: Mon, 8 Apr 2013 13:26:55 +0200

perf: Fix strncpy() use, always make sure it's NUL terminated

For NUL terminated string, always make sure that there's '\0' at the end.

In our case we need a return value, so still use strncpy() and
fix up the tail explicitly.

(strlcpy() returns the size, not the pointer)

Signed-off-by: Chen Gang gang.c...@asianux.com
Cc: a.p.zijls...@chello.nl a.p.zijls...@chello.nl
Cc: pau...@samba.org pau...@samba.org
Cc: a...@ghostprotocols.net a...@ghostprotocols.net
Link: http://lkml.kernel.org/r/51623e0b.7070...@asianux.com
Signed-off-by: Ingo Molnar mi...@kernel.org
---
 kernel/events/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 59412d0..7f0d67e 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4737,7 +4737,8 @@ static void perf_event_mmap_event(struct perf_mmap_event 
*mmap_event)
} else {
if (arch_vma_name(mmap_event-vma)) {
name = strncpy(tmp, arch_vma_name(mmap_event-vma),
-  sizeof(tmp));
+  sizeof(tmp) - 1);
+   tmp[sizeof(tmp) - 1] = '\0';
goto got_name;
}
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/