[PATCH] arm64/sve: Rework SVE access trap to convert state in registers

Mark Brown broonie at kernel.org
Wed Apr 7 16:55:39 BST 2021


On Wed, Apr 07, 2021 at 01:48:06PM +0100, Mark Brown wrote:
> On Wed, Apr 07, 2021 at 12:45:12PM +0100, Catalin Marinas wrote:

> > via do_el0_svc(). So it looks like we may restore some old SVE state
> > after a syscall (maybe I'm missing something but it would be nice to
> > follow zero or preserved approach).
> 
> The state is currently converted via the fpsimd_to_sve() call in the
> trap handler, that *should* be dealing with anything required for
> conversion.  You're right that this seems to miss zeroing anything
> outside of the values it immediately writes - I might be missing
> something though.  It's only going to leak information from the current

Actually I found that we do have the zeroing - it's done in sve_alloc()
where we either kzalloc() a new state or memset() an existing state so
that's covered already
-------------- 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/20210407/5a78ae2b/attachment.sig>


More information about the linux-arm-kernel mailing list