Thread (64 messages) 64 messages, 5 authors, 2023-08-10

Re: [PATCH v3 21/36] arm64/mm: Implement map_shadow_stack()

From: Szabolcs Nagy <hidden>
Date: 2023-08-07 10:21:51
Also in: kvmarm, linux-arm-kernel, linux-doc, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml

The 07/31/2023 14:43, Mark Brown wrote:
+SYSCALL_DEFINE3(map_shadow_stack, unsigned long, addr, unsigned long, size, unsigned int, flags)
+{
+	unsigned long alloc_size;
+	unsigned long __user *cap_ptr;
+	unsigned long cap_val;
+	int ret;
+
+	if (!system_supports_gcs())
+		return -EOPNOTSUPP;
+
+	if (flags)
+		return -EINVAL;
+
+	if (addr % 16)
+		return -EINVAL;
mmap addr must be page aligned (and there is no align req on size).

i'd expect similar api here.
+
+	if (size == 16 || size % 16)
+		return -EINVAL;
why %16 and not %8 ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help