On Tue, May 6, 2025 at 10:39 PM Andrii Nakryiko andrii.nakryiko@gmail.com wrote:
if (vma->vm_pgoff)
return -EINVAL;
any particular reason to not allow vm_pgoff?
Doesn't seem particularly useful because the header is at offset 0, and I don't trust myself to get the overflow checks done right.
it's certainly subjective, but I find this error handling with !err in for loop condition hard to follow. What's wrong with arguably more straightforward (and as you can see I'm not a big fan of mutated addr but calculated vma->vm_start + i * PAGE_SIZE: pick one style one follow it for both entities?):
Yeah that's nicer, I was just going off of what Alexei proposed.