[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YwS5cN7GlbdR5IQU@sirena.org.uk>
Date: Tue, 23 Aug 2022 12:26:40 +0100
From: Mark Brown <broonie@...nel.org>
To: Wang ShaoBo <bobo.shaobowang@...wei.com>
Cc: catalin.marinas@....com, weiyongjun1@...wei.com,
guohanjun@...wei.com, oleg@...hat.com, will@...nel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64/sme: Clearing TIF_SVE but not TIF_SME in za_set()
On Tue, Aug 23, 2022 at 09:56:27AM +0800, Wang ShaoBo wrote:
> Clearing target's TIF_SVE but not current's TIF_SME in za_set(), as it indicates
> target's SVE storage unavailable.
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -1084,7 +1084,7 @@ static int za_set(struct task_struct *target,
> if (!target->thread.sve_state) {
> sve_alloc(target);
> if (!target->thread.sve_state) {
> - clear_thread_flag(TIF_SME);
> + clear_tsk_thread_flag(target, TIF_SVE);
> ret = -ENOMEM;
> goto out;
> }
We didn't set TIF_SVE so we have no reason to clear it here, we know it
can't have been set since there was no sve_state allocated. The clear
of TIF_SME is happening on the wrong task though, and TBH is just
redudnant for similar reasons.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists