On Thu, Aug 20, 2020 at 02:45:38PM -0700, Dave Hansen wrote: > > > > Guys, could you please enlighen me, I don't understand -- we pass some > > random user-space pointer and save it in vm_area_struct then in procfs > > we treat it as "string" and print out? What prevents me to put some crap > > here then unmap this pointer the kernel will cause page fault in procfs > > output (in best scenario)? > > Remember, this is virtually identical to what we do for > /proc/$pid/cmdline in get_mm_cmdline(). The kernel goes following a > user-provided pointer into the user address space looking for a string. > > If userspace points it to garbage, access_remote_vm() will fail safely. Yeah, managed to miss it, thanks!