arm64: Add the arm64.no32bit_el0 command line option
Subsystems (2)
PATCH v2 1/1 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.
Changes in V2:
- fixed the order of appearance of arm64.no32bit_el0 entry in kernel-parameters.txt documentation.
--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/kernel/idreg-override.c | 2 ++ 2 files changed, 5 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -415,6 +415,9 @@ arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards Format: <io>,<irq>,<nodeID> + arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of + 32 bit applications + arm64.nobti [ARM64] Unconditionally disable Branch Target Identification support
arch/arm64/kernel/idreg-override.c +2 -0
@@ -86,6 +86,7 @@ static const struct ftr_set_desc pfr0 __prel64_initconst = { .override = &id_aa64pfr0_override, .fields = {FIELD ("sve" ,ID_AA64PFR0_EL1_SVE_SHIFT , pfr0_sve_filter), + FIELD("el0", ID_AA64PFR0_EL1_EL0_SHIFT, NULL), {} }, };
@@ -197,6 +198,7 @@ static const struct { { "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" }, { "nokaslr", "arm64_sw.nokaslr=1" }, + { "arm64.no32bit_el0", "id_aa64pfr0.el0=1" }, };static int __init parse_hexdigit (const char *p,u64 *v)
Signature · 1 line
2.41.0
Quoted 55 lines · Andrea della Porta
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.Changes in V2:
- fixed the order of appearance of arm64.no32bit_el0 entry in kernel-parameters.txt documentation.Signed-off-by Andrea della Porta <[email protected]>--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/kernel/idreg-override.c | 2 ++ 2 files changed, 5 insertions(+)Documentation/admin-guide/kernel-parameters.txt +3
-0@@ -415,6 +415,9 @@ arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards Format: <io>,<irq>,<nodeID> + arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of + 32 bit applications + arm64.nobti [ARM64] Unconditionally disable Branch Target Identification supportarch/arm64/kernel/idreg-override.c +2
-0@@ -86,6 +86,7 @@ static const struct ftr_set_desc pfr0 __prel64_initconst = { .override = &id_aa64pfr0_override, .fields = {FIELD ("sve" ,ID_AA64PFR0_EL1_SVE_SHIFT , pfr0_sve_filter), + FIELD("el0", ID_AA64PFR0_EL1_EL0_SHIFT, NULL), {} }, };@@ -197,6 +198,7 @@ static const struct { { "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" }, { "nokaslr", "arm64_sw.nokaslr=1" }, + { "arm64.no32bit_el0", "id_aa64pfr0.el0=1" }, };static int __init parse_hexdigit (const char *p,u64 *v)Signature · 1 line
2.41.0
A gentle ping about this patch... any thoughts about it?
Many thanks,
Andrea
Will Deacon
maintainerQuoted 52 lines · Andrea della Porta
Quoted 51 lines · Andrea della Porta
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.Changes in V2:
- fixed the order of appearance of arm64.no32bit_el0 entry in kernel-parameters.txt documentation.Signed-off-by Andrea della Porta <[email protected]>--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/arm64/kernel/idreg-override.c | 2 ++ 2 files changed, 5 insertions(+)Documentation/admin-guide/kernel-parameters.txt +3
-0@@ -415,6 +415,9 @@ arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards Format: <io>,<irq>,<nodeID> + arm64.no32bit_el0 [ARM64] Unconditionally disable the execution of + 32 bit applications + arm64.nobti [ARM64] Unconditionally disable Branch Target Identification supportarch/arm64/kernel/idreg-override.c +2
-0@@ -86,6 +86,7 @@ static const struct ftr_set_desc pfr0 __prel64_initconst = { .override = &id_aa64pfr0_override, .fields = {FIELD ("sve" ,ID_AA64PFR0_EL1_SVE_SHIFT , pfr0_sve_filter), + FIELD("el0", ID_AA64PFR0_EL1_EL0_SHIFT, NULL), {} }, };@@ -197,6 +198,7 @@ static const struct { { "arm64.nomops", "id_aa64isar2.mops=0" }, { "arm64.nomte", "id_aa64pfr1.mte=0" }, { "nokaslr", "arm64_sw.nokaslr=1" }, + { "arm64.no32bit_el0", "id_aa64pfr0.el0=1" }, };
Quoted 6 lines
Quoted 4 lines
arch/arm64/kernel/idreg-override.c +0
-0static int __init parse_hexdigit (const char *p,u64 *v)Signature · 1 line
2.41.0A gentle ping about this patch... any thoughts about it?
It looks reasonable to me, but arch/arm64/kernel/idreg-override.c no longer exists upstream, so you need to rebase.
Thanks,
Will