aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <Vineet.Gupta1@synopsys.com>2013-01-09 09:36:28 -0500
committerTony Luck <tony.luck@intel.com>2013-01-09 13:48:34 -0500
commitb6fca72536fb94098acb23c00b4e65d3bc4bb252 (patch)
tree5fec671de29e4fee7a0be6aca6e93d0acbe09a0d
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff)
sysctl: Enable IA64 "ignore-unaligned-usertrap" to be used cross-arch
IA64 defines /proc/sys/kernel/ignore-unaligned-usertrap to control verbose warnings on unaligned access emulation. Although the exact mechanics of what to do with sysctl (ignore/shout) are arch specific, this change enables the sysctl to be usable cross-arch. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--init/Kconfig7
-rw-r--r--kernel/sysctl.c9
3 files changed, 15 insertions, 2 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 3279646120e3..5fb10644d9ed 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -40,6 +40,7 @@ config IA64
40 select ARCH_THREAD_INFO_ALLOCATOR 40 select ARCH_THREAD_INFO_ALLOCATOR
41 select ARCH_CLOCKSOURCE_DATA 41 select ARCH_CLOCKSOURCE_DATA
42 select GENERIC_TIME_VSYSCALL_OLD 42 select GENERIC_TIME_VSYSCALL_OLD
43 select SYSCTL_ARCH_UNALIGN_NO_WARN
43 select HAVE_MOD_ARCH_SPECIFIC 44 select HAVE_MOD_ARCH_SPECIFIC
44 select MODULES_USE_ELF_RELA 45 select MODULES_USE_ELF_RELA
45 default y 46 default y
diff --git a/init/Kconfig b/init/Kconfig
index 7d30240e5bfe..523bee15fb44 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1232,6 +1232,13 @@ config SYSCTL_EXCEPTION_TRACE
1232 help 1232 help
1233 Enable support for /proc/sys/debug/exception-trace. 1233 Enable support for /proc/sys/debug/exception-trace.
1234 1234
1235config SYSCTL_ARCH_UNALIGN_NO_WARN
1236 bool
1237 help
1238 Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1239 Allows arch to define/use @no_unaligned_warning to possibly warn
1240 about unaligned access emulation going on under the hood.
1241
1235config KALLSYMS 1242config KALLSYMS
1236 bool "Load all symbols for debugging/ksymoops" if EXPERT 1243 bool "Load all symbols for debugging/ksymoops" if EXPERT
1237 default y 1244 default y
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c88878db491e..840fd5eb2309 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -161,10 +161,13 @@ extern int unaligned_enabled;
161#endif 161#endif
162 162
163#ifdef CONFIG_IA64 163#ifdef CONFIG_IA64
164extern int no_unaligned_warning;
165extern int unaligned_dump_stack; 164extern int unaligned_dump_stack;
166#endif 165#endif
167 166
167#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
168extern int no_unaligned_warning;
169#endif
170
168#ifdef CONFIG_PROC_SYSCTL 171#ifdef CONFIG_PROC_SYSCTL
169static int proc_do_cad_pid(struct ctl_table *table, int write, 172static int proc_do_cad_pid(struct ctl_table *table, int write,
170 void __user *buffer, size_t *lenp, loff_t *ppos); 173 void __user *buffer, size_t *lenp, loff_t *ppos);
@@ -911,7 +914,7 @@ static struct ctl_table kern_table[] = {
911 .proc_handler = proc_doulongvec_minmax, 914 .proc_handler = proc_doulongvec_minmax,
912 }, 915 },
913#endif 916#endif
914#ifdef CONFIG_IA64 917#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
915 { 918 {
916 .procname = "ignore-unaligned-usertrap", 919 .procname = "ignore-unaligned-usertrap",
917 .data = &no_unaligned_warning, 920 .data = &no_unaligned_warning,
@@ -919,6 +922,8 @@ static struct ctl_table kern_table[] = {
919 .mode = 0644, 922 .mode = 0644,
920 .proc_handler = proc_dointvec, 923 .proc_handler = proc_dointvec,
921 }, 924 },
925#endif
926#ifdef CONFIG_IA64
922 { 927 {
923 .procname = "unaligned-dump-stack", 928 .procname = "unaligned-dump-stack",
924 .data = &unaligned_dump_stack, 929 .data = &unaligned_dump_stack,