Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d944d549 authored by Russell King's avatar Russell King
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0fa11802
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -315,6 +315,11 @@ and is between 256 and 4096 characters. It is defined in the file
	aic79xx=	[HW,SCSI]
			See Documentation/scsi/aic79xx.txt.

	alignment=	[KNL,ARM]
			Allow the default userspace alignment fault handler
			behaviour to be specified.  Bit 0 enables warnings,
			bit 1 enables fixups, and bit 2 sends a segfault.

	amd_iommu=	[HW,X86-84]
			Pass parameters to the AMD IOMMU driver in the system.
			Possible values are:
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/moduleparam.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -77,6 +78,8 @@ static unsigned long ai_dword;
static unsigned long ai_multi;
static int ai_usermode;

core_param(alignment, ai_usermode, int, 0600);

#define UM_WARN		(1 << 0)
#define UM_FIXUP	(1 << 1)
#define UM_SIGNAL	(1 << 2)