On Tue, Oct 18, 2022 at 03:05:24PM +0000, Song Liu wrote: > Maybe we need something like vcopy_exec(x_mem, tmp_buf, size), where > we explicitly check the allowed memory of x_mem is bigger or equal to > size. And users of vmalloc_exec should only use vcopy_exec to update > memory from vmalloc_exec. > > Does this make sense? Did I understand your concern correctly? It sounds sensible. Make sure it iѕ properly documented and reviewed by people that actually know this area. I just know enough to ask stupid question, not to very something is actually correct :)