[PATCH] arm64/mte: Remove asymmetric mode from the prctl() interface

Catalin Marinas catalin.marinas at arm.com
Tue Mar 8 10:40:17 PST 2022


On Tue, Mar 08, 2022 at 02:22:30PM +0000, Mark Brown wrote:
> diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
> index fb777d8fea32..2b35b706a7ba 100644
> --- a/arch/arm64/kernel/mte.c
> +++ b/arch/arm64/kernel/mte.c
> @@ -308,7 +308,16 @@ long set_mte_ctrl(struct task_struct *task, unsigned long arg)
>  		mte_ctrl |= MTE_CTRL_TCF_ASYNC;
>  	if (arg & PR_MTE_TCF_SYNC)
>  		mte_ctrl |= MTE_CTRL_TCF_SYNC;
> -	if (arg & PR_MTE_TCF_ASYMM)
> +
> +	/*
> +	 * If the system supports it and both sync and async modes are
> +	 * specified then implicitly enable asymmetric mode.
> +	 * Userspace could see a mix of both sync and async anyway due
> +	 * to differing or changing defaults on CPUs.
> +	 */

Exactly, so it can't be confusing for an application.

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list