On 15/06/2023 17:54, Tudor Cretu wrote:
The aio_ring buffer is a shared memory region that hosts the io_event array. The io_event struct may contain user pointers, so the memory region must be allowed to store and load capability pointers.
... in PCuABI.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com
fs/aio.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/fs/aio.c b/fs/aio.c index 31a9b1c818e0..a0bd049b0c45 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -482,6 +482,11 @@ static int aio_ring_mmap(struct file *file, struct vm_area_struct *vma) { vma->vm_flags |= VM_DONTEXPAND; vma->vm_ops = &aio_ring_vm_ops;
- if (IS_ENABLED(CONFIG_CHERI_PURECAP_UABI)) {
A lot simpler now! We could just use a normal #ifdef since we don't need to declare variables any more.
Kevin
vma->vm_flags |= VM_READ_CAPS | VM_WRITE_CAPS;
vma_set_page_prot(vma);
- }
- return 0;
}