mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE
Previously we were always returning a tag inclusion mask of zero via
PR_GET_TAGGED_ADDR_CTRL if TCF0 was set to NONE. Fix it by making
the code for the NONE case match the others.
Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/Iefbea66cf7d2b4c80b82f9639b9ea7f33f7fac53
Fixes: af5ce95282
("arm64: mte: Allow user control of the generated random tags via prctl()")
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20201203075110.2781021-1-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
9e5344e0ff
commit
929c1f3384
@ -189,7 +189,8 @@ long get_mte_ctrl(struct task_struct *task)
|
|||||||
|
|
||||||
switch (task->thread.sctlr_tcf0) {
|
switch (task->thread.sctlr_tcf0) {
|
||||||
case SCTLR_EL1_TCF0_NONE:
|
case SCTLR_EL1_TCF0_NONE:
|
||||||
return PR_MTE_TCF_NONE;
|
ret |= PR_MTE_TCF_NONE;
|
||||||
|
break;
|
||||||
case SCTLR_EL1_TCF0_SYNC:
|
case SCTLR_EL1_TCF0_SYNC:
|
||||||
ret |= PR_MTE_TCF_SYNC;
|
ret |= PR_MTE_TCF_SYNC;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user