On 18/10/2022 12:42, Teo Couprie Diaz wrote:
brk is not implemented in purecap, return -ENOSYS when not in compat.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
Thanks Tudor for providing the code snippet, making it much more clear than my original ideas. v2: Fix style and format issues.
mm/mmap.c | 5 +++++ 1 file changed, 5 insertions(+)
Applied on next, thanks!
Kevin
diff --git a/mm/mmap.c b/mm/mmap.c index ce282f9d9f8e..5de8e48b66b7 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -202,6 +202,11 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) bool downgraded = false; LIST_HEAD(uf); +#ifdef CONFIG_CHERI_PURECAP_UABI
- if (!in_compat_syscall())
return -ENOSYS;
+#endif
- if (mmap_write_lock_killable(mm)) return -EINTR;
base-commit: 3deb26714719d5068f5ef5d0fa9bc457c3cef6c1