selftests: ftrace: Internal error: Oops: sve_save_state

Mark Brown broonie at kernel.org
Tue Oct 17 07:03:24 PDT 2023


On Tue, Oct 17, 2023 at 02:42:01PM +0100, Mark Rutland wrote:

> So unless sve_alloc() failed, at the instant the IRQ was taken:

> * `task->thread.sve_state` should be non-NULL
> * `task->thread_info.flags & TIF_SVE` should be 0

> ... so if `task->thread.sve_state` becomes NULL, I wonder if we end up
> accidentally blatting that as part of the context switch? I can't immedaitely
> see how/

We're possibly missing a fpsimd_bind_task_to_cpu() somewhere since all
the hilarity with KVM means that we don't use the task_struct to save
state, though the task that's taking the SVE trap shouldn't be impacted
there if it didn't set TIF_SVE yet.  There *is* a window where we have
TIF_SVE set but didn't yet do the rebind but that should be in a preempt
disabled section.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20231017/c0fbb175/attachment-0001.sig>


More information about the linux-arm-kernel mailing list