Thread (28 messages) 28 messages, 5 authors, 2024-10-03

Re: [PATCH RFT v9 4/8] fork: Add shadow stack support to clone3()

From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2024-10-02 21:25:12
Also in: linux-kselftest, lkml

On Wed, 2024-10-02 at 22:01 +0100, Mark Brown wrote:
BTW it's probably also worth noting that at least on arm64 (perhaps x86
is different here?) the shadow stack of a thread that exited won't have
a token placed on it so it won't be possible to use it with clone3() at
all unless another token is written.  To get a shadow stack you could
use with clone3() you'd either need to allocate a new one, pivot away
from one that's currently in use or enable shadow stack writes and place
a token.
Hmm, yea. I didn't have a specific idea in mind. But yea, you would have to
switch to something in order to leave a token.

If you enabled WRSS (or similar) you might be able to reuse shadow stacks in
some kind of useful way, but in that case you would probably WRSS the token to
the end of the shadow stack and the start+size would fit better.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help