Thread (154 messages) 154 messages, 12 authors, 2023-03-20

Re: [PATCH v7 38/41] x86/fpu: Add helper for initing features

From: Borislav Petkov <bp@alien8.de>
Date: 2023-03-13 17:12:54
Also in: linux-api, linux-arch, linux-mm, lkml

On Mon, Mar 13, 2023 at 04:10:14PM +0000, Edgecombe, Rick P wrote:
This seems more clear. I'm sorry for the noise here though, because
this has made me realize that the initing logic should never be hit. We
used to support the full CET_U state in ptrace, but then dropped it to
just the SSP and only allowed it when shadow stack is active.
Right, you do check that at function entry.
This means that CET_U will always have at least the CET_SHSTK_EN bit
set and so not be in the init state. So this can probably just warn
and bail if it sees an init state.
I don't mind the additional checks as this is a security thing so
sanity checks are good, especially if they're cheap.

And you don't need to reinit the buffer - just scream loudly when get_xsave_addr()
returns NULL.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help