Commit d944d549aa86e08cba080396513234cf048fee1f
1 parent
0fa11802e0
Exists in
master
and in
20 other branches
ARM: allow alignment fault mode to be configured at kernel boot
Some glibc versions intentionally create lots of alignment faults in their gconv code, which if not fixed up, results in segfaults during boot. This can prevent systems booting properly. There is no clear hard-configurable default for this; the desired default depends on the nature of the userspace which is going to be booted. So, provide a way for the alignment fault handler to be configured via the kernel command line. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Showing 2 changed files with 8 additions and 0 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -315,6 +315,11 @@ |
315 | 315 | aic79xx= [HW,SCSI] |
316 | 316 | See Documentation/scsi/aic79xx.txt. |
317 | 317 | |
318 | + alignment= [KNL,ARM] | |
319 | + Allow the default userspace alignment fault handler | |
320 | + behaviour to be specified. Bit 0 enables warnings, | |
321 | + bit 1 enables fixups, and bit 2 sends a segfault. | |
322 | + | |
318 | 323 | amd_iommu= [HW,X86-84] |
319 | 324 | Pass parameters to the AMD IOMMU driver in the system. |
320 | 325 | Possible values are: |
arch/arm/mm/alignment.c
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | 12 | * published by the Free Software Foundation. |
13 | 13 | */ |
14 | +#include <linux/moduleparam.h> | |
14 | 15 | #include <linux/compiler.h> |
15 | 16 | #include <linux/kernel.h> |
16 | 17 | #include <linux/errno.h> |
... | ... | @@ -76,6 +77,8 @@ |
76 | 77 | static unsigned long ai_dword; |
77 | 78 | static unsigned long ai_multi; |
78 | 79 | static int ai_usermode; |
80 | + | |
81 | +core_param(alignment, ai_usermode, int, 0600); | |
79 | 82 | |
80 | 83 | #define UM_WARN (1 << 0) |
81 | 84 | #define UM_FIXUP (1 << 1) |