> The only caller of kcopy is uiomove. There is no way a function like > this can ever work. If you need to rely on your copy function to save > you from pointers outside the address space, it means you don't know > what garbage you're passing it. Meaning you may well be passing it > pointers inside the address space, but to something unexpected, which > you will then shit on. > > Replace with memcpy.
Vetoed. kcopy() is not only used to move data from the kernel data section to the kernel data section. It is used to move data *within the kernel address space* to data *within the kernel address space*. Think dd if=/dev/mem ... Miod