Skip to content

Commit a944521

Browse files
brooniectmarinas
authored andcommitted
arm64/idreg: Add overrride for GCS
Hook up an override for GCS, allowing it to be disabled from the command line by specifying arm64.nogcs in case there are problems. Reviewed-by: Thiago Jung Bauermann <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 6497b66 commit a944521

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
@@ -446,6 +446,9 @@
446446
arm64.nobti [ARM64] Unconditionally disable Branch Target
447447
Identification support
448448

449+
arm64.nogcs [ARM64] Unconditionally disable Guarded Control Stack
450+
support
451+
449452
arm64.nomops [ARM64] Unconditionally disable Memory Copy and Memory
450453
Set instructions support
451454

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static const struct ftr_set_desc pfr1 __prel64_initconst = {
133133
.override = &id_aa64pfr1_override,
134134
.fields = {
135135
FIELD("bt", ID_AA64PFR1_EL1_BT_SHIFT, NULL ),
136+
FIELD("gcs", ID_AA64PFR1_EL1_GCS_SHIFT, NULL),
136137
FIELD("mte", ID_AA64PFR1_EL1_MTE_SHIFT, NULL),
137138
FIELD("sme", ID_AA64PFR1_EL1_SME_SHIFT, pfr1_sme_filter),
138139
{}
@@ -215,6 +216,7 @@ static const struct {
215216
{ "arm64.nosve", "id_aa64pfr0.sve=0" },
216217
{ "arm64.nosme", "id_aa64pfr1.sme=0" },
217218
{ "arm64.nobti", "id_aa64pfr1.bt=0" },
219+
{ "arm64.nogcs", "id_aa64pfr1.gcs=0" },
218220
{ "arm64.nopauth",
219221
"id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 "
220222
"id_aa64isar1.api=0 id_aa64isar1.apa=0 "

0 commit comments

Comments
 (0)