History

[IA64] sysctl option to silence unaligned trap warnings

Allow sysadmin to disable all warnings about userland apps making unaligned accesses by using: # echo 1 > /proc/sys/kernel/ignore-unaligned-usertrap Rather than having to use prctl on a process by process basis. Default behaivour leaves the warnings enabled.

Jes Sorensen committed 20 years ago

Commit d2b176e1 parent c8c16353 files · +43 −3Browse files

Showing the changes to kernel (1 of 3 files). Show all

Unified · Split

kernel/sysctl.c+14−0
@@ -124,6 +124,10 @@ extern int sysctl_hz_timer; · 123 unmodified lines
124124 extern int acct_parm[];
125125 #endif
126126
127+#ifdef CONFIG_IA64
128+extern int no_unaligned_warning;
129+#endif
130+
127131 static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t,
128132 ctl_table *, void **);
129133 static int proc_doutsstring(ctl_table *table, int write, struct file *filp,
@@ -665,6 +669,16 @@ static ctl_table kern_table[] = { · 535 unmodified lines
665669 .mode = 0644,
666670 .proc_handler = &proc_dointvec,
667671 },
672+#endif
673+#ifdef CONFIG_IA64
674+ {
675+ .ctl_name = KERN_IA64_UNALIGNED,
676+ .procname = "ignore-unaligned-usertrap",
677+ .data = &no_unaligned_warning,
678+ .maxlen = sizeof (int),
679+ .mode = 0644,
680+ .proc_handler = &proc_dointvec,
681+ },
668682 #endif
669683 { .ctl_name = 0 }
670684 };