On Tue, Feb 27, 2024 at 05:31:28PM -0800, Alexei Starovoitov wrote: > What would it look like with a cookie? > A static inline wrapper around get_vm_area() that returns area->addr ? > And the start address of vmap range will be such a cookie? Hmm, just making the kernel virtual address the cookie actually sounds pretty neat indeed even if I did not have that in mind. > I guess I don't understand the motivation to hide 'struct vm_struct *'. The prime reason is that then people will try to start random APIs that work on it. But let's give it a try without the wrappers and see how things go.