arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE
PATCH 1/1 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.
--- arch/arm64/kernel/mte.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/mte.c +2 -1
@@ -189,7 +189,8 @@ long get_mte_ctrl(struct task_struct *task)switch (task->thread.sctlr_tcf0) {case SCTLR_EL1_TCF0_NONE : -return PR_MTE_TCF_NONE ; + ret |=PR_MTE_TCF_NONE ; +break ;case SCTLR_EL1_TCF0_SYNC : ret |=PR_MTE_TCF_SYNC ;break ;
Signature · 7 lines
2.29.2.454.gaff20da3a2-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 15 lines · Peter Collingbourne
Previously we were always returning a tag inclusion mask of zero via
PR_GET_TAGGED_ADDR_CTRLif TCF0 was set to NONE. Fix it by making the code for the NONE case match the others.Signed-off-by Peter Collingbourne <[email protected]>--- arch/arm64/kernel/mte.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/mte.c +0
-0
arch/arm64/kernel/mte.c long get_mte_ctrl(struct task_struct *task) · line 196
Quoted 9 lines
arch/arm64/kernel/mte.c +2
-1@@ -189,7 +189,8 @@ long get_mte_ctrl(struct task_struct *task)switch (task->thread.sctlr_tcf0) {case SCTLR_EL1_TCF0_NONE : -return PR_MTE_TCF_NONE ; + ret |=PR_MTE_TCF_NONE ; +break ;case SCTLR_EL1_TCF0_SYNC : ret |=PR_MTE_TCF_SYNC ;break ;
With a fixes tag:
Will, if you have another pull request for 5.10, please pick this up as well (it's an ABI fix so it would be nice to get it in the first release with MTE support). Otherwise I'll queue it at -rc1 and cc stable.
Thanks.
Signature · 6 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 3 lines · Peter Collingbourne
Previously we were always returning a tag inclusion mask of zero via
PR_GET_TAGGED_ADDR_CTRLif TCF0 was set to NONE. Fix it by making the code for the NONE case match the others.
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: mte: fix prctl(PR_GET_TAGGED_ADDR_CTRL) if TCF0=NONE
https://git.kernel.org/arm64/c/929c1f3384d7
Cheers,
Signature · 10 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel