Skip to content

Commit ead7de4

Browse files
willdeaconPeter Zijlstra
authored andcommitted
arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0
Allow systems with mismatched 32-bit support at EL0 to run 32-bit applications based on a new kernel parameter. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7af3350 commit ead7de4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,14 @@
287287
do not want to use tracing_snapshot_alloc() as it needs
288288
to be done where GFP_KERNEL allocations are allowed.
289289

290+
allow_mismatched_32bit_el0 [ARM64]
291+
Allow execve() of 32-bit applications and setting of the
292+
PER_LINUX32 personality on systems where only a strict
293+
subset of the CPUs support 32-bit EL0. When this
294+
parameter is present, the set of CPUs supporting 32-bit
295+
EL0 is indicated by /sys/devices/system/cpu/aarch32_el0
296+
and hot-unplug operations may be restricted.
297+
290298
amd_iommu= [HW,X86-64]
291299
Pass parameters to the AMD IOMMU driver in the system.
292300
Possible values are:

arch/arm64/kernel/cpufeature.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,13 @@ const struct cpumask *system_32bit_el0_cpumask(void)
13221322
return cpu_possible_mask;
13231323
}
13241324

1325+
static int __init parse_32bit_el0_param(char *str)
1326+
{
1327+
allow_mismatched_32bit_el0 = true;
1328+
return 0;
1329+
}
1330+
early_param("allow_mismatched_32bit_el0", parse_32bit_el0_param);
1331+
13251332
static ssize_t aarch32_el0_show(struct device *dev,
13261333
struct device_attribute *attr, char *buf)
13271334
{

0 commit comments

Comments
 (0)