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

Re: [PATCH v7 01/41] Documentation/x86: Add CET shadow stack description

From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2023-03-01 18:32:43
Also in: linux-api, linux-arch, linux-mm, lkml

On Wed, 2023-03-01 at 10:07 -0800, Rick Edgecombe wrote:
quoted
If one wants to scan the shadow stack how to detect the end (e.g.
fast
backtrace)? Is it useful to put an invalid value (-1) there?
(affects map_shadow_stack syscall too).
Interesting idea. I think it's probably not a breaking ABI change if
we
wanted to add it later.
One complication could be how to handle shadow stacks created outside
of thread creation. map_shadow_stack would typically add a token at the
end so it could be pivoted to. So then the backtracing algorithm would
have to know to skip it or something to find a special start of stack
marker.

Alternatively, the thread shadow stacks could get an already used token
pushed at the end, to try to match what an in-use map_shadow_stack
shadow stack would look like. Then the backtracing algorithm could just
look for the same token in both cases. It might get confused in exotic
cases and mistake a token in the middle of the stack for the end of the
allocation though. Hmm...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help