My teacher said that the conditions for COW is that the command that caused the page fault was a write command in user mode and also that the translation exists in the page table (present = 0).
But I do not understand why it is necessary that it be in a user code? Why is it not possible for COW optimization to be used in kernel code?