Skip to content

Commit 1279e8d

Browse files
Andrea della Portawilldeacon
authored andcommitted
arm64: Add the arm64.no32bit_el0 command line option
Introducing the field 'el0' to the idreg-override for register ID_AA64PFR0_EL1. This field is also aliased to the new kernel command line option 'arm64.no32bit_el0' as a more recognizable and mnemonic name to disable the execution of 32 bit userspace applications (i.e. avoid Aarch32 execution state in EL0) from kernel command line. Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Andrea della Porta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 080297b commit 1279e8d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@
431431
arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
432432
Format: <io>,<irq>,<nodeID>
433433

434+
arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of
435+
32 bit applications.
436+
434437
arm64.nobti [ARM64] Unconditionally disable Branch Target
435438
Identification support
436439

arch/arm64/kernel/pi/idreg-override.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ static const struct ftr_set_desc pfr0 __prel64_initconst = {
108108
.override = &id_aa64pfr0_override,
109109
.fields = {
110110
FIELD("sve", ID_AA64PFR0_EL1_SVE_SHIFT, pfr0_sve_filter),
111+
FIELD("el0", ID_AA64PFR0_EL1_EL0_SHIFT, NULL),
111112
{}
112113
},
113114
};
@@ -223,6 +224,7 @@ static const struct {
223224
{ "nokaslr", "arm64_sw.nokaslr=1" },
224225
{ "rodata=off", "arm64_sw.rodataoff=1" },
225226
{ "arm64.nolva", "id_aa64mmfr2.varange=0" },
227+
{ "arm64.no32bit_el0", "id_aa64pfr0.el0=1" },
226228
};
227229

228230
static int __init parse_hexdigit(const char *p, u64 *v)

0 commit comments

Comments
 (0)