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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 09, 2024 at 08:18:11PM +0000, Edgecombe, Rick P wrote:
> On Sat, 2024-02-03 at 00:05 +0000, Mark Brown wrote:

> > +       if (write_user_shstk_64((u64 __user *)addr, 0))
> > +               return false;
> > +
> > +       return true;
> > +}

> So, don't we want to consume the token on the *new* task's MM, which
> was already duplicated but still unmapped? In which case I think the
> other arch's would need to GUP regardless of the existence of shadow
> stack atomic ops.

Yes, that would be better - if nothing else it allows reuse of the same
shadow stack for multiple !CLONE_VM clone3()s.  

> I wonder about adding a shstk_post_fork() to make it easier to think
> about and maintain, even if there are no issues today.

I agree.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux