[RFC PATCH v1 15/28] riscv/mm: Implement map_shadow_stack() syscall
Mark Brown
broonie at kernel.org
Thu Feb 22 05:33:10 PST 2024
On Wed, Feb 21, 2024 at 04:47:11PM -0800, Deepak Gupta wrote:
> On Tue, Feb 06, 2024 at 04:01:28PM +0000, Mark Brown wrote:
> > > +#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */
> > For arm64 I also added a SHADOW_STACK_SET_MARKER for adding a top of
> > stack marker, did you have any thoughts on that for RISC-V? I think x86
> > were considering adding it too, it'd be good if we could get things
> > consistent.
> Please correct me on this. A token at the top which can't be consumed to restore
> but *just* purely as marker, right?
Yes, for arm64 we just leave a zero word (which can't be a valid token)
above the stack switch token, that does mean you can't exactly tell that
the top of stack marker is there unless there's also a stack switch
token below it.
> It's a good design basic with not a lot of cost.
> I think risc-v should be able to converge on that.
Great.
-------------- 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-riscv/attachments/20240222/2aa453e9/attachment.sig>
More information about the linux-riscv
mailing list