Re: [RFC PATCH v1 15/28] riscv/mm: Implement map_shadow_stack() syscall

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

 



On Fri, Feb 09, 2024 at 08:44:53PM +0000, Edgecombe, Rick P wrote:
On Wed, 2024-01-24 at 22:21 -0800, debug@xxxxxxxxxxxx wrote:
From: Deepak Gupta <debug@xxxxxxxxxxxx>

As discussed extensively in the changelog for the addition of this
syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the
existing mmap() and madvise() syscalls do not map entirely well onto
the
security requirements for guarded control stacks since they lead to
windows where memory is allocated but not yet protected or stacks
which
are not properly and safely initialised. Instead a new syscall
map_shadow_stack() has been defined which allocates and initialises a
shadow stack page.

This patch implements this syscall for riscv. riscv doesn't require
token
to be setup by kernel because user mode can do that by itself.
However to
provide compatiblity and portability with other architectues, user
mode can
specify token set flag.

A lot of this code look very familiar. We'll have to think about at
what point we could pull some of it into the code kernel.

I think if we had an arch write_user_shstk(), most of the code could be
shared here.

Yes it is. I'll think a little bit more on this on next set of patchsets
when I send.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux