[PATCH 1/2] arm64: gcs: Return -EPERM not -EBUSY for prctl() locking failures
Mark Brown
broonie at kernel.org
Thu Sep 10 12:00:40 PDT 2026
When we refuse to perform a GCS configuration change due to locking we
currently return -EBUSY which is an odd error code to return. While the
selftest does currently check for this it is unlikely that we have any
practical users relying on the behaviour at this point so let's change
to return the more descriptive -EPERM instead like other architectures.
Reported-by: Bill Roberts <bill.roberts at foss.arm.com>
Signed-off-by: Mark Brown <broonie at kernel.org>
---
arch/arm64/include/asm/gcs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/gcs.h b/arch/arm64/include/asm/gcs.h
index 8fa0707069e8..bbc22e382cfe 100644
--- a/arch/arm64/include/asm/gcs.h
+++ b/arch/arm64/include/asm/gcs.h
@@ -76,7 +76,7 @@ static inline int gcs_check_locked(struct task_struct *task,
new_val &= task->thread.gcs_el0_locked;
if (cur_val != new_val)
- return -EBUSY;
+ return -EPERM;
return 0;
}
--
2.47.3
More information about the linux-arm-kernel
mailing list