On 27/09/2023 14:27, Tudor Cretu wrote:
+#ifdef CONFIG_CHERI_PURECAP_UABI
- /* Check that the pointer has ownership of the mapping */
- if (!cheri_check_cap((void __user *)zc->address, zc->length, CHERI_PERM_SW_VMEM))
return -EFAULT;
It's really a borderline situation, but I would say let's make it -EINVAL. That would be more consistent with other syscalls that require VMem, and maybe more importantly it feels "less surprising" than failing with -EFAULT on a permission that is unrelated to memory accesses.
Kevin